Author Topic: Raising a number to a non-integer power.  (Read 2579 times)

0 Members and 1 Guest are viewing this topic.

Offline Circlotron

  • Super Contributor
  • ***
  • Posts: 1848
  • Country: au
Raising a number to a non-integer power.
« on: May 27, 2020, 06:00:11 am »
Okay, so 4^3 = 4x4x4 = 64.
But 4^3.9 = ?? = 222.861.
How can you multiply a number by itself a non-integer amount of times?
 

Online greenpossum

  • Frequent Contributor
  • **
  • Posts: 259
  • Country: au
Re: Raising a number to a non-integer power.
« Reply #1 on: May 27, 2020, 06:09:31 am »
It's just the extension in the real number domain of taking the exponent. Mathematics is like that, analogies can only go so far.

But if you like, think of it as 4^(39/10) so take the 39th power of 4 and then the 10th root. Things get tricky to imagine when the exponent is irrational.
« Last Edit: May 27, 2020, 06:12:29 am by greenpossum »
 
The following users thanked this post: mathsquid, I wanted a rude username

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 8597
Re: Raising a number to a non-integer power.
« Reply #2 on: May 27, 2020, 06:14:52 am »
I'm no mathematician so the terminology here is going to give a real mathematician fits.  Without getting into logarithms, or huge powers of four, break that down to:
 43 x root10(4)9

root10(n) is the tenth root of n, i.e, the function where if:
 m=root10(n)
then:
 m10=n

That approach is valid for any rational real number.

As GreenPossum points out, its not any help with irrational numbers. so letting X be the exponent, although it gives you a function with an infinite number of points along any interval of the X axis, it isn't continuous.   To get the  'in-between' irrational values you have to consider exponentiation as multiplying the logarithm of n by the power X, then taking the antilog, which works in any base of logarithms, and is a continuous function, numerically identical to the 'classic' multiplying numbers by them-selves X times concept for any real rational X.

Where it gets gnarly to conceptualise is when you start extending exponentiation YX into the complex number domain for both Y and X.   I cant wrap my brain around the number of dimensions required to visualise that plot - its bad enough visualising the complex result of a function operating on a single real number parameter, which is a 3D plot.
« Last Edit: May 27, 2020, 06:38:44 am by Ian.M »
 

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 2376
  • Country: ro
Re: Raising a number to a non-integer power.
« Reply #3 on: May 27, 2020, 07:51:55 am »
Okay, so 4^3 = 4x4x4 = 64.
But 4^3.9 = ?? = 222.861.
How can you multiply a number by itself a non-integer amount of times?

Short answer, the exponential function is defined as a polynomial.  Explanation starts at minute 7:00, at about 7:50 is exactly your question.

 
The following users thanked this post: T3sl4co1l

Offline tom66

  • Super Contributor
  • ***
  • Posts: 3762
  • Country: gb
  • Electron Fiddler, FPGA Hacker, Embedded Systems EE
Re: Raising a number to a non-integer power.
« Reply #4 on: May 27, 2020, 08:57:22 am »
Okay, so 4^3 = 4x4x4 = 64.
But 4^3.9 = ?? = 222.861.
How can you multiply a number by itself a non-integer amount of times?

Because log10(222.861)/log10(3.9) = ~4.  And that is the division of two base10 logarithms.  You can easily define log10(n), and you have inferred what the solution to your non-integer power is with nothing more than division.

Mathematical operations often have an inverse.

Try fractional and negative factorial if you -really- want to blow your mind.
 

Offline magic

  • Super Contributor
  • ***
  • Posts: 2121
  • Country: pl
Re: Raising a number to a non-integer power.
« Reply #5 on: May 27, 2020, 09:00:17 am »
How can you multiply a number by itself a non-integer amount of times?
You don't. But you can say that you wish to have a function with the following convenient properties, arbitrarily chosen to mach the behavior of normal exponentiation:

an = n times a·a·a·..·a
ax+y = ax·ay
ax·y = (ax)y
be a continuous function over all real numbers because why not

The first condition defines ax for positive integers.

The second condition forces to choose the following for nonpositive integers:
a0 = 1
a-n = 1 / an

The third condition forces the following on rationals:
a1/n = nth root of a

The fourth condition leaves little choice for the reals because the rationals are dense in the reals:
ax = lim (axn), for any infinite sequence xn of rationals such that lim (xn) = x

Simple :phew:
 :-DD

Short answer, the exponential function is defined as a polynomial.
Certainly not. The exponential rises asymptotically faster than any polynomial.
x100 is not exponential growth, contrary to what most journalists would want you to believe these days.

TL;DW but your video either discusses infinite sums of polynomials which aren't really polynomials anymore, locally valid approximations or is simply wrong.
 
The following users thanked this post: hans, mathsquid

Offline Kleinstein

  • Super Contributor
  • ***
  • Posts: 7523
  • Country: de
Re: Raising a number to a non-integer power.
« Reply #6 on: May 27, 2020, 09:43:56 am »
One can use the logarithm and exponential to rewrite the power:
 A^B =  exp( B * ln(A))

In this form there is no problem having B with a non integer value. It just gets messy if A is negative as this would lead to complex numbers.
 
The following users thanked this post: Ian.M

Offline Brumby

  • Supporter
  • ****
  • Posts: 10027
  • Country: au
Re: Raising a number to a non-integer power.
« Reply #7 on: May 27, 2020, 10:25:42 am »
This is a good example of how such an expression actually does make sense:
But if you like, think of it as 4^(39/10) so take the 39th power of 4 and then the 10th root.

You can then take this to the extreme for any numbers.  For example: 3.839^5.776 would be the 1/1000th root of 3.839^5776.  Each of these steps is pretty straightforward, even if laborious to solve.

By following the principles involved, it becomes apparent that exponentiation encompasses a broad scope where integer exponents are just a special case.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 15229
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Raising a number to a non-integer power.
« Reply #8 on: May 27, 2020, 11:38:22 am »
Understood more generally, and perhaps apparent if you've watched the 3b1b video -- we use an algebraic expression (exponentiation of ordinary numbers) to imply an algebraic (or higher level, e.g. transcendental) equation, which may have zero, one or many solutions.

Of note, taking the 10th root implies there are 10 possible, equivalent, solutions: using the 10 roots of unity.  Remember that sqrt(4) = +/- 2, not just +2!  If we constrain our answer to the real domain, only two of those remain; but in the complex domain, all ten are equally valid.

When working with general analytical functions, we often must be mindful of this, not just to finite numbers of answers, but whole spaces of them -- for example there are infinite "branches" of the ln(z) function, because e^(i x) is periodic.  (When this fact isn't interesting, we usually choose the "main branch" (x ∈ (-pi, pi]), denoted Ln(z).)

Similar answers pop up for expressions like x^x, or i^i.  While you can easily solve these for a superficial curve or value, the functions they are equivalent to lie in much more interesting spaces, and there are many equivalent answers, not just one!  (I think one of the follow-up videos in the 3b1b series covers exactly this, if you're interested.)

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 19673
  • Country: nl
    • NCT Developments
Re: Raising a number to a non-integer power.
« Reply #9 on: May 27, 2020, 12:42:24 pm »
#include "math.h"

float a=pow(4.0, 3.9);
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 5325
  • Country: fr
Re: Raising a number to a non-integer power.
« Reply #10 on: May 27, 2020, 03:05:05 pm »
I guess already explained above.
It's the exponentiation, and is explained there: https://en.wikipedia.org/wiki/Exponentiation
An integer exponent is a particular case of exponentiation.
 

Offline mark03

  • Frequent Contributor
  • **
  • Posts: 662
  • Country: us
Re: Raising a number to a non-integer power.
« Reply #11 on: May 27, 2020, 03:12:31 pm »
What is this number i that you speak of?
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 15229
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Raising a number to a non-integer power.
« Reply #12 on: May 27, 2020, 03:17:43 pm »
What is this number i that you speak of?

You must be 'j'oking ;D

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: hans, mark03, Circlotron, RoGeorge

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 1353
  • Country: us
  • Retired, now restoring antique test equipment
Re: Raising a number to a non-integer power.
« Reply #13 on: May 27, 2020, 07:11:36 pm »
The best joke I encountered in a physics lecture was by the late Professor Ugo Fano at the University of Chicago (ca. 1976).
He was demonstrating the quantum calculation of dielectric polarization, expressing the macroscopic result as the expectation value of the quantum calculation.
He used quantum perturbation theory to relate the polarization to the applied E field, expressing the Hamiltonian (essentially the energy) as a function of E and the harmonic binding of electrons.
He then performed a Fourier decomposition of E(t) into frequency components, an integral over w (I can't find lower-case omega here) of E(w) ei wt dw .
One of the theory weenies in the first row objected, "Professor Fano, that Hamiltonian is not Hermitian!", by which he meant that the energy must be real and not complex.
Prof. Fano erased the "i", replacing it by "j" and declared the Hamiltonian was now Hermitian.
 
The following users thanked this post: vk6zgo, T3sl4co1l

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 1353
  • Country: us
  • Retired, now restoring antique test equipment
Re: Raising a number to a non-integer power.
« Reply #14 on: May 27, 2020, 07:14:17 pm »
I also learned that the formal definition of exponentiation in modern mathematics is the one involving logarithms, which is required when the exponent is not a rational fraction.  It also allows raising a variable by a complex exponent.  It reduces to the usual expression when the exponent is an integer or fraction.
 

Offline Alex Eisenhut

  • Super Contributor
  • ***
  • Posts: 2253
  • Country: ca
  • If you can buy it for 4$ on eBay, why design it?*
Re: Raising a number to a non-integer power.
« Reply #15 on: May 27, 2020, 07:18:20 pm »
For that matter, how can you multiply a number by itself a negative number of times?
*Except AC/DC adapters on eBay. Avoid them all!
 

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 2376
  • Country: ro
Re: Raising a number to a non-integer power.
« Reply #16 on: May 27, 2020, 07:53:31 pm »
(I can't find lower-case omega here)

EEVblog forum can render LaTex notation.  Lower case Omega can be written as
Code: [Select]
\$\omega\$
That will be displayed as \$\omega\$.

Offline daqq

  • Super Contributor
  • ***
  • Posts: 1794
  • Country: sk
    • My site
Re: Raising a number to a non-integer power.
« Reply #17 on: May 27, 2020, 08:18:44 pm »
What is this number i that you speak of?

You must be 'j'oking ;D

Tim
He probably just imagined it.
Believe it or not, pointy haired people do exist!
+++Divide By Cucumber Error. Please Reinstall Universe And Reboot +++
 
The following users thanked this post: hans, Brumby, newbrain

Offline Kleinstein

  • Super Contributor
  • ***
  • Posts: 7523
  • Country: de
Re: Raising a number to a non-integer power.
« Reply #18 on: May 27, 2020, 08:33:17 pm »
For that matter, how can you multiply a number by itself a negative number of times?

This one is easy:  the negative exponents give the inverse. So  A^(-B)  =  1 / A^B.
So multiply -2 times is the same as dividing 2 times.
 

Offline magic

  • Super Contributor
  • ***
  • Posts: 2121
  • Country: pl
Re: Raising a number to a non-integer power.
« Reply #19 on: May 27, 2020, 09:24:55 pm »
One can use the logarithm and exponential to rewrite the power:
 A^B =  exp( B * ln(A))
Yeah, I guess you can do that, but then you need to define exp(x) as something other than ex to avoid circular definition.

It can be done, there are weird-ass formulas which resolve to ex without explicitly mentioning e itself and taking powers of it.
But actually teaching it that way is an exercise in applied obfuscation.

I also learned that the formal definition of exponentiation in modern mathematics is the one involving logarithms, which is required when the exponent is not a rational fraction.
Not required. I have defined it without a single stinkin' logarithm ;)
 

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 1353
  • Country: us
  • Retired, now restoring antique test equipment
Re: Raising a number to a non-integer power.
« Reply #20 on: May 28, 2020, 02:54:58 am »
No, your definition only works for real numbers, using the limit of a sequence of rational numbers to deal with the irrational case.
The logarithm method also works for complex numbers.
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 1705
  • Country: fi
    • My home page and email address
Re: Raising a number to a non-integer power.
« Reply #21 on: May 28, 2020, 03:25:48 am »
Actually, the form ab = 2b log2 a is useful, as it is something a computer can do in binary directly, and quite efficiently for base-2 floating point numbers. Details.
 

Online vk6zgo

  • Super Contributor
  • ***
  • Posts: 5365
  • Country: au
Re: Raising a number to a non-integer power.
« Reply #22 on: May 28, 2020, 05:12:50 am »
From 30+ years ago (& it was revision then), the classic formula for fractional indices is a^p/q = the qth root of  a^p
I was hoping to use the calculator, but the HP22S doesn't seen to have the capability of powers or roots to other than base 2 or e.

I could use the logs, but to hell with it!
 

Offline magic

  • Super Contributor
  • ***
  • Posts: 2121
  • Country: pl
Re: Raising a number to a non-integer power.
« Reply #23 on: May 28, 2020, 12:57:38 pm »
No, your definition only works for real numbers, using the limit of a sequence of rational numbers to deal with the irrational case.
The logarithm method also works for complex numbers.
Fair enough, off the top of my head I can't provide a simple algebraic argument why complex exponents should be defined the way they are. That doesn't necessarily mean no such argument exists. I don't know what reasoning originally led to the Euler identity and things like that - perhaps the Taylor series, maybe something more direct and straightforward.

That being said, I totally expected OP to stop reading at the first limit if he even made it that far, so who cares about C ;)
 

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 1353
  • Country: us
  • Retired, now restoring antique test equipment
Re: Raising a number to a non-integer power.
« Reply #24 on: May 28, 2020, 01:25:36 pm »
In my youth, if I needed more accuracy than from my slide rule, I used 5-place logarithm tables (and log-trig tables) to do my serious computations, so the logarithm definition comes naturally to me.   We referred to the Chemical Rubber Company "Handbook of Mathematical Tables" as the Rubber Bible.  (Formally, the "Mathematical Tables from the Handbook of Chemistry and Physics")  7-place tables were available, but that was overkill.
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 5325
  • Country: fr
Re: Raising a number to a non-integer power.
« Reply #25 on: May 28, 2020, 02:32:37 pm »
Actually, the form ab = 2b log2 a is useful, as it is something a computer can do in binary directly, and quite efficiently for base-2 floating point numbers. Details.

Yep!
Generally speaking, even for integer exponentiation, a binary algorithm is much more efficient than a simple linear algorithm (multiplying the number by itself b times.)
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 1705
  • Country: fi
    • My home page and email address
Re: Raising a number to a non-integer power.
« Reply #26 on: May 29, 2020, 01:05:38 am »
For those interested, the binary integer algorithm calculates ab for integer b>0 with at most 2 log2 b multiplications. In pseudocode,
Code: [Select]
Function ipow(a, b):
    Let result = 1
    While b > 0:
        If b is odd:
            result = result × a
            b = (b - 1) / 2
        Else
            b = b / 2
        End If
        a = a × a
    End While
    Return result
End Function
For negative b, you do 1/ipow(a,-b) or ipow(1/a, -b).  b=0 is mathematically ambiguous case, and usually handled separately.
Programming languages with integer division (dropping the fractional part, or rounding toward zero, or binary shift right by one bit), just do b = b / 2 in both branches of the If clause.
The one extra squaring of a is avoided in practice by moving the end-of-loop test to just after halving b.
 

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 2376
  • Country: ro
Re: Raising a number to a non-integer power.
« Reply #27 on: May 29, 2020, 05:37:32 am »
Op asks what is the intuitive representation of raising a number to a fractional power, gets answers about best numerical algorithms.    ::)

Software devs are the best example for the saying "When you have a hammer, everything looks like a nail".  Not sure if this is their biggest flaw or their biggest power.  And, if that's a power indeed, is it a non-integer one?   ;D
 
The following users thanked this post: chriva

Offline magic

  • Super Contributor
  • ***
  • Posts: 2121
  • Country: pl
Re: Raising a number to a non-integer power.
« Reply #28 on: May 29, 2020, 07:35:10 am »
Software devs are the best example for the saying "When you have a hammer, everything looks like a nail".  Not sure if this is their biggest flaw or their biggest power.
Look at the software available today, compare with the software available 15 years ago, take a wild guess ::)
 

Offline aneevuser

  • Regular Contributor
  • *
  • Posts: 155
  • Country: gb
Re: Raising a number to a non-integer power.
« Reply #29 on: May 29, 2020, 10:55:17 am »

Fair enough, off the top of my head I can't provide a simple algebraic argument why complex exponents should be defined the way they are. That doesn't necessarily mean no such argument exists. I don't know what reasoning originally led to the Euler identity and things like that - perhaps the Taylor series, maybe something more direct and straightforward.
You might want to take a look at the first chapter (and others) of "Visual Complex Analysis" by Needham, which gives a couple of suggestive geometric/algebraic arguments for the validity of Euler's formula.
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 1705
  • Country: fi
    • My home page and email address
Re: Raising a number to a non-integer power.
« Reply #30 on: May 29, 2020, 06:42:43 pm »
Op asks what is the intuitive representation of raising a number to a fractional power, gets answers about best numerical algorithms.    ::)
Hey!  It was a clarification to a comment why expressing a fractional power ab using base-two exponent and base-two logarithm, 2b log2 a is a practical way to look at it, because that's how computers deal with it.

Let's recap:

One way to look at non-integer powers is to look at fractional powers:
    ab/c = ab · a1/c
The second term is the same as c'th root of a, by definition.  So, for example 23.5 = 23·20.5 = 23·√2 = 8√2.

This approach has the problem that it only works for rational numbers – those that you can express as the ratio of two integers –, you cannot calculate e.g. 2π with it.  Besides, it's slow and burdensome.

To solve this problem, John Napier introduced logarithms in 1614.  The basic equivalence with exponentiation is
    ex = y  ⇔  x = loge y
It's main purpose is to make multiplication and division easier.  Logarithm turns multiplication into addition, division into subtraction, using just standard multiplication rules (for powers), with exponentiation as its inverse:
    A · B = eloge A · eloge B = e(loge A) + (loge B)
    A / B = A · B-1 = eloge A · e- loge B = e(loge A) - (loge B)

Technically, logarithms are defined only for nonnegative reals, but we can treat the signs of A and B separately anyway in multiplication and division trivially: if we have an odd number of negative values, the result is also negative; otherwise it is positive.  Easy peasy.

Mathematically, this equivalence gives us a simple way to express any power via exponentiation and logarithms as
    ab = eb logea

Because e is an irrational number itself (it has infinite number of digits in any integer base, be it decimal or binary or other), it is something that computers cannot handle directly, and can bother us humans quite a bit, too.  So, instead, the base 2 one is used in computers (and some humans, too):
    ab = 2b log2a
There is lots of information about the base-2 logarithm, or binary logarithm, for example at Wikipedia.

But wait, didn't we just come around a full circle, and just answer the question with "by raising 2 to a fractional power you calculate thus"?

No, because raising 2 to a fractional power is a special function we can call base-2 exponential.
You are probably already aware of the exponential function, exp(x) = ex.
The base-2 exponential is very similar, except there are algorithms how a computer (or a human counting in binary) can approximate it directly, to whatever precision you like.  So, while it looks like the same problem, technically the procedure is
    ab = exp2(b log2 a)

How one should grasp it intuitively, then?

Think of integers in the number line.  They're distinct, with a gap in between.  We use real numbers to describe values that do not match any specific integer, but fall in between two integers.  Positive integers can count things, so they're very intuitive, even many animals can do it.  Reals are more difficult.  Rational numbers are ratios of two integers, but they aren't all reals; we also have irrationals like π that cannot be expressed exactly as a ratio of two integers.  So, it is better to think of real numbers as being in between integers, without a perfect real-world analog.

In the exact same way as real numbers extend integer points to a continuous line, non-integer powers extend integer powers to a continuous curve.  Non-integer powers behave exactly like integer powers, mathematically.  So, the best way to intuitively grasp it, is an extension to the integer powers, really.

So yeah, we really don't have a good analog for non-integer powers.  One tripping point is that if we want to calculate the numerical value without having a tool that can do it directly for us, we'll need exponentiation and logarithms to do so.  You might think that is because they are somehow special, but it is quite the opposite: exponentiation and logarithms are just the tool we use for the extension, and themselves have a very clear, intuitive definition.

Is this any better, RoGeorge?  I bet it is five times more than most members here care to read, so that's why I tried to only drop in the minimal nugget.  Would've been much better as a video, too.
« Last Edit: May 29, 2020, 06:49:21 pm by Nominal Animal »
 

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 2376
  • Country: ro
Re: Raising a number to a non-integer power.
« Reply #31 on: May 29, 2020, 11:49:24 pm »
In the exact same way as real numbers extend integer points to a continuous line, non-integer powers extend integer powers to a continuous curve.

Perfect, hard to explain in less words!   :-+

The next chart first represents 41, 42, 43, 44, 45 as red dots.  Looks like the red dots nicely align like the beads on an invisible string.  That invisible string is our function 4x, drawn as a green dotted curve.  If we stick a blue dot on that green curve, and move it left and right, that would show values for fractional power, and if we drag it to x = 3.9, the blue dot will show us the value for 43.9.

It will be almost like 4 multiplied 4 times, but a little less than 4x4x4x4.



For a live, interactive chart
https://www.desmos.com/calculator/s9zbhc9mcy

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 1705
  • Country: fi
    • My home page and email address
Re: Raising a number to a non-integer power.
« Reply #32 on: May 30, 2020, 04:22:43 am »
Exactly.

Visual examination also gives a good starting point for intuition on the behaviour of the exponential function and the logarithm.

The curve y = exp(x) has slope x at x=x, and the natural logarithm curve, y = log(x), has slope 1/x at x=x.

This kind of extension is needed for us humans, because our intuition is not sufficient to handle all the things we can understand.  We need logic, and mathematical tools we don't have intuitive real-world analogs for, only definitions.

As an example, consider functions.  There is something called a Lambert W function, which cannot be expressed in terms of elementary functions at all; we cannot express it exactly in form W(z) = ... .  We can approximate it numerically, though, to any desired precision you want.  Anyway, the Lambert W function is defined as the function that satisfies W(z) exp(W(z)) = z.  This means that for example, if you wanted to solve exp(-z) = z, the answer is z = W(1) ≃ 0.56714329.  Or, if you wanted to solve exp(-z)=z / 2, the answer is z = W(2) ≃ 0.8526102.  Except that W(1) and W(2) are the exact answers, and when looking for a behaviour of something ("What kind of function fulfills these rules?"), the answer just might be W(z).

Before you think that that the Lambert W function is just a mathematical curiosity, I'll just point out that it is the function that provides the exact solution for the double-well Dirac delta function model for equal charges: for example, the hydrogen molecule.  It's not a curiosity or "pure math", it is an useful tool for describing stuff in nature.  It's just hard to pin down in "human terms".  At some point, you just have to accept that some of the mathematical tools you use don't have good real-world analogs or plain explanations, and that knowing their operating context and rules is enough – unless you're a mathematician.  I ain't.
« Last Edit: May 30, 2020, 04:26:25 am by Nominal Animal »
 

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 2376
  • Country: ro
Re: Raising a number to a non-integer power.
« Reply #33 on: May 30, 2020, 10:42:51 am »
I'm not familiar with the Lambert W function, but calling that a function feels like cheating.  By definition, a function can not have more than one output for a single input.

Maybe in math we can change or extend the definition for what a function is, but then it will be out of this world.

In the physical world, when for a single input we observe multiple results, it means we are missing something, like an extra input variable we disregarded, or an extra function/phenomenon we don't realize it's there.

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 15229
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Raising a number to a non-integer power.
« Reply #34 on: May 30, 2020, 12:29:35 pm »
It's a function if you specify a main branch, right.  That can sometimes be hand-wavy when it shouldn't be.

Just as ln(z) is not a function, it has infinite solutions ln(z) = ln(z) + 2n pi i; by convention we take the main branch (-pi < Im(ln(z)) <= pi), Ln(z).

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 5325
  • Country: fr
Re: Raising a number to a non-integer power.
« Reply #35 on: May 30, 2020, 03:01:06 pm »
I'm not familiar with the Lambert W function, but calling that a function feels like cheating.  By definition, a function can not have more than one output for a single input.

Maybe in math we can change or extend the definition for what a function is, but then it will be out of this world.

This is called a multivalued function, and this isn't an ordinary function indeed.

https://en.wikipedia.org/wiki/Multivalued_function

Quote
In the physical world, when for a single input we observe multiple results, it means we are missing something, like an extra input variable we disregarded, or an extra function/phenomenon we don't realize it's there.

Quoting Wikipedia:
Quote
In physics, multivalued functions play an increasingly important role. They form the mathematical basis for Dirac's magnetic monopoles, for the theory of defects in crystals and the resulting plasticity of materials, for vortices in superfluids and superconductors, and for phase transitions in these systems, for instance melting and quark confinement. They are the origin of gauge field structures in many branches of physics.
« Last Edit: May 30, 2020, 03:03:42 pm by SiliconWizard »
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 1705
  • Country: fi
    • My home page and email address
Re: Raising a number to a non-integer power.
« Reply #36 on: May 30, 2020, 04:10:08 pm »
Yup!

I used Lambert W as an example of a "completely unintuitive function-like thing" that is very useful but almost impossible to find real world analogs or useful intuitive reasoning for, to show why we must not expect to have good analogs or intuitive explanations for all our mathematical tools.

When I first started learning calculus, I had a hard time giving up wondering "what value" δ(0) is.  δ(x) is the Dirac delta function.  δ(x)=0 for all x except x=0, but its integral over all real x is 1.  I internally settled for something like "infinitesimal infinity" (I don't think I've ever said it aloud), before I realized the entire question is nonsense.  δ(x) is a mathematical tool with specific rules and behaviour, and does not necessarily have that property at all!  Indeed, if you find that to solve a problem you need the value of δ(0) outside any differential equation or similar context, you can be sure that you went wrong somewhere.

Also consider dimensional analysis.  In dimensional analysis, you drop all quantities (numbers) and apply your model (equation or formulae) to the units only, and see what kind of unit pops out.  If you get e.g. m/s where you expect time units, you know that either you made a mistake, or the model is b0rked.  But working out a formula or equation with units, and completely without numbers or variables, is pretty counter-intuitive to most people.  Many learn to just ignore the units and work with the numbers only, and that sometimes leads to really bad mistakes.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 15229
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Raising a number to a non-integer power.
« Reply #37 on: May 30, 2020, 04:59:19 pm »
I used Lambert W as an example of a "completely unintuitive function-like thing" that is very useful but almost impossible to find real world analogs or useful intuitive reasoning for, to show why we must not expect to have good analogs or intuitive explanations for all our mathematical tools.

Another way to express it could be as returning a vector, i.e., a function \$ \mathbb{R} \rightarrow \mathbb{R}^n \$, and more generally than that, functions of arbitrary dimension in the domain and range.  This requires more formalism to pack up (i.e., are we using linear algebra, set theory, etc.?), but the basic idea can be seen.  Applied in another domain, we might think of functions in computer science as some dimension in the parameters, and the return values (assuming pure functions, i.e. no side effects, no internal state).  We introduce type theory (the vectors need to be not just the same number of elements, but the same types as well).  And then we can think about data and its typing in various useful ways.


Quote
When I first started learning calculus, I had a hard time giving up wondering "what value" δ(0) is.  δ(x) is the Dirac delta function.  δ(x)=0 for all x except x=0, but its integral over all real x is 1.  I internally settled for something like "infinitesimal infinity" (I don't think I've ever said it aloud), before I realized the entire question is nonsense.  δ(x) is a mathematical tool with specific rules and behaviour, and does not necessarily have that property at all!  Indeed, if you find that to solve a problem you need the value of δ(0) outside any differential equation or similar context, you can be sure that you went wrong somewhere.

Indeed, when a continuous function is desired, a common implementation is a Gaussian with lim width-->0 and height-->inf, taking the joint limit such that the integral property is preserved.  This gives a rigorous basis and allows some analyses which would otherwise fail on the more basic definition.  But it is indeed a not-function, in its basic form, and I think most instructors are careful to point that out when it's introduced (at least, mine were).


Quote
Also consider dimensional analysis.  In dimensional analysis, you drop all quantities (numbers) and apply your model (equation or formulae) to the units only, and see what kind of unit pops out.  If you get e.g. m/s where you expect time units, you know that either you made a mistake, or the model is b0rked.  But working out a formula or equation with units, and completely without numbers or variables, is pretty counter-intuitive to most people.  Many learn to just ignore the units and work with the numbers only, and that sometimes leads to really bad mistakes.

Yup, and since dimensions are conserved under arithmetic operations, you can assign dummy dimensions to mathematical variables (which might otherwise be dimensionless), and track down some algebraic errors in the process (when you're working large equations by hand).

And it's not just a physicist's hand-waving tool, it has rigorous application!  Using a change of variables, units can be extracted from otherwise very difficult expressions.  Feynman integration is a famous case, where the units are extracted from an integral, so that the integral is over an abstract mathematical function, which then merely returns a dimensionless geometric constant.  All the dimensional relationships are basic arithmetic, so that qualitatively speaking, we have everything we need to know about the problem, and exact results are merely proportional to that.

And we can then compute that function through any experiment or dynamical system which is equivalent to it, not just the problem in question.

Tim
« Last Edit: May 30, 2020, 05:01:22 pm by T3sl4co1l »
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: Nominal Animal

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 1353
  • Country: us
  • Retired, now restoring antique test equipment
Re: Raising a number to a non-integer power.
« Reply #38 on: May 30, 2020, 08:04:59 pm »
The rigorous definition of the Dirac delta is not a function, but a “distribution”, sometimes called a “generalized function”.  Although the original concept came before him, it was developed and tidied up by Laurent Schwartz midway through the last century.  See Wikipedia for a summary.  There is no difference between his formulation and the results obtained with common concepts involving shrinking tall Gaussian curves to the limit, but it is a good example of mathematics catching up with a useful bit of physics.
(In my youth, we studied the history of the Einstein Summation Convention that was held discretely on the Kronecker Delta.)
 
The following users thanked this post: T3sl4co1l

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 1705
  • Country: fi
    • My home page and email address
Re: Raising a number to a non-integer power.
« Reply #39 on: May 30, 2020, 09:40:08 pm »
The rigorous definition of the Dirac delta is not a function, but a “distribution”, sometimes called a “generalized function”.
In the context of this thread, "generalized function" would be key  ;)  (Because the mathematical concept of "distribution" doesn't really match what a layman might think a distribution is, you see, and this thread is all about our human need for intuitive real-life analogs.)

From generalized functions or "distributions" (in the mathematical, not traditional statistical sense) one gets to functionals and vector spaces and linear algebra and whatnot, all very useful tools.

Me, I was never particularly good at math, and what little I know, is all hard-fought.  I didn't really grok differential calculus until I started working with interatomic potentials.  Before, I could solve problems I recognized, sure; but it was just applying methods I knew, like treating each problem as a perp and looking them up in my mental records, then applying the suggested methods therein.  No true insight, no creativity, just straightforward grunt work.  Now, it feels different.  Enjoyable.  Like a very nice, well-worn, reliable tool.

Or I might just be going bonkers in my middle age, and sliding waaay back on the D-K scale!
 

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 1353
  • Country: us
  • Retired, now restoring antique test equipment
Re: Raising a number to a non-integer power.
« Reply #40 on: May 30, 2020, 10:53:24 pm »
English terms for mathematical concepts are usually existing words, already in use in common language.
"Function" (v) can mean to work or operate in a desired way
"Function" (n) can refer to a formal social event.
The advantage of using "standard" nomenclature is the ease of locating information, as in the Wikipedia article on "distribution".  I like Wikipedia's term "disambiguation" for separating out different meanings of the same word.
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 1705
  • Country: fi
    • My home page and email address
Re: Raising a number to a non-integer power.
« Reply #41 on: May 31, 2020, 01:42:36 am »
I wasn't disagreeing, just trying to make sure others reading this thread won't accidentally conflate it with statistics, TimFox.

In this kind of a thread, where we're looking at ways to help others understand stuff better, I've found that carefully picking the terms to help steer those climbing the ladder helps, even if the terms used aren't the conventional or usual ones; the implicit associations matter.

I do agree that distribution is the better term, in general.  But, in the context of this particular thread, the underlying key is extension or generalization of mathematical tools we have real world analogs for to those we have not.

As an example, when talking about unit quaternions in the context of spatial rotations, I like to use the term versor, because many (programmers at least) have encountered quaternions and found them untractable or unreasonably hard.  The truth is, unit quaternions are easy, much easier than Euler or Tait-Bryan angles, and perfectly useful for anyone working in 3D on computers or microcontrollers.  In the realm of spatial rotations, versors really only use a couple of details from quaternions proper (Hamilton product, really).  Slap on conversion to a 3D rotation matrix (of which there is only one, unlike Euler or Tait-Bryan angle conventions), addition/interpolation properties (and how renormalization to unit quaternion does not have any directional bias, unlike E/T-B), plus possibly recovering the versor from a pure 3D rotation matrix, and it's all there.  It all fits one one or two sheets of paper.  Picking the name "versor" is just a psychological tool to avoid the association with any preconceptions on how quaternions are "hard".  Since they haven't any preconceptions against "versor", they tend to be very surprised how simple the operations and their implementation are.
 

Offline basinstreetdesign

  • Frequent Contributor
  • **
  • Posts: 354
  • Country: ca
Re: Raising a number to a non-integer power.
« Reply #42 on: May 31, 2020, 02:17:37 am »
What is this number i that you speak of?

You must be 'j'oking ;D

Tim
He probably just imagined it.

Get real! ;D
STAND BACK!  I'm going to try SCIENCE!
 
The following users thanked this post: Circlotron

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 2376
  • Country: ro
Re: Raising a number to a non-integer power.
« Reply #43 on: May 31, 2020, 06:43:46 am »

Offline Brumby

  • Supporter
  • ****
  • Posts: 10027
  • Country: au
 

Offline Brumby

  • Supporter
  • ****
  • Posts: 10027
  • Country: au
Re: Raising a number to a non-integer power.
« Reply #45 on: May 31, 2020, 07:13:16 am »
Also consider dimensional analysis.  In dimensional analysis, you drop all quantities (numbers) and apply your model (equation or formulae) to the units only, and see what kind of unit pops out.
Back in high school, I did this when looking at E=mc2 to find the units needed to match with E and m was a velocity.  Now I know this actually has a name (many decades later).  (Why it was the particular numeric value of the speed of light was a further question - but one which I did not pursue.)

Yup, and since dimensions are conserved under arithmetic operations, you can assign dummy dimensions to mathematical variables (which might otherwise be dimensionless), and track down some algebraic errors in the process (when you're working large equations by hand).
That's a neat trick.  I like it.
 

Offline magic

  • Super Contributor
  • ***
  • Posts: 2121
  • Country: pl
Re: Raising a number to a non-integer power.
« Reply #46 on: May 31, 2020, 08:40:50 am »
In the exact same way as real numbers extend integer points to a continuous line, non-integer powers extend integer powers to a continuous curve.  Non-integer powers behave exactly like integer powers, mathematically.  So, the best way to intuitively grasp it, is an extension to the integer powers, really.
OK, but there is infinitely many such extensions (even continuous and infinitely differentiable) that differ in the exact curvature between your chosen points. You really need additional arguments to demand this one particular extension that's currently accepted.

So yeah, we really don't have a good analog for non-integer powers.  One tripping point is that if we want to calculate the numerical value without having a tool that can do it directly for us, we'll need exponentiation and logarithms to do so.  You might think that is because they are somehow special, but it is quite the opposite: exponentiation and logarithms are just the tool we use for the extension, and themselves have a very clear, intuitive definition.
I would agree it's clear and intuitive what 2+2 is, but not sure what's intuitive about the definition of ln(sqrt(2)) :-//

Moreover, there is absolutely no readily apparent reason why ab defined in terms of exp/ln should give the results we expect when a and b are natural.
Unless you define exp in terms of ex, but you can't do that because you just defined ab in terms of exp ::)
 

Offline Someone

  • Super Contributor
  • ***
  • Posts: 2467
  • Country: au
Re: Raising a number to a non-integer power.
« Reply #47 on: May 31, 2020, 10:49:22 am »
ab makes a perfectly logical extension to real values of b. x! for positive reals, still plausible; but over the whole reals.... thats mind bending.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 15229
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Raising a number to a non-integer power.
« Reply #48 on: May 31, 2020, 01:59:08 pm »
ab makes a perfectly logical extension to real values of b. x! for positive reals, still plausible; but over the whole reals.... thats mind bending.

Well, literally impossible, too; a typical analytic extension of factorial has a pole at (-1)!, so further extension isn't meaningful.  However, if we integrate around the poles taking the principal value, we get a meaningful answer again (with finitely many exceptions: the poles themselves).  Thus it works for complex numbers, and you can find real (non-integer) values after all. :)

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 1705
  • Country: fi
    • My home page and email address
Re: Raising a number to a non-integer power.
« Reply #49 on: June 01, 2020, 04:57:46 am »
In the exact same way as real numbers extend integer points to a continuous line, non-integer powers extend integer powers to a continuous curve.  Non-integer powers behave exactly like integer powers, mathematically.  So, the best way to intuitively grasp it, is an extension to the integer powers, really.
OK, but there is infinitely many such extensions (even continuous and infinitely differentiable) that differ in the exact curvature between your chosen points. You really need additional arguments to demand this one particular extension that's currently accepted.
No, there is only one the fulfills the standard arithmetic rules of addition and subtraction in the exponent for both integers and non-integers (reals).  I mean, for which exp(a+b) = exp(a)·exp(b) and exp(a-b) = exp(a)/exp(b).

So yeah, we really don't have a good analog for non-integer powers.  One tripping point is that if we want to calculate the numerical value without having a tool that can do it directly for us, we'll need exponentiation and logarithms to do so.  You might think that is because they are somehow special, but it is quite the opposite: exponentiation and logarithms are just the tool we use for the extension, and themselves have a very clear, intuitive definition.
I would agree it's clear and intuitive what 2+2 is, but not sure what's intuitive about the definition of ln(sqrt(2)) :-//
I meant that after all the math work to prove their properties are what has been claimed, a layman can grasp exponentiation and logarithm in very simple terms:
exp(x) is the curve that has slope x at x, and has value exp(0)=1.
loge(x) is the curve that has slope 1/x at x, and has value loge(1)=0.

You do need lots more math to prove this is so, or to discover why this is so, but for an intuitive understanding of what they are (as opposed to why or how), this suffices.

Unless you define exp in terms of ex, but you can't do that because you just defined ab in terms of exp ::)
Let's not try and be cute here. exp(x) ≝ ex. I use the form exp(x) to remind the reader that this is not a cyclical definition; that we can define ex for all real x as a function that does not rely on being able to raise a value to a non-integer power.

It is well and good (and I definitely appreciate it) if you(or anyone else) point out errors or holes in my argument, but in the context of this thread, it is not worthwhile to point out the lack of mathematical rigor, because the issue here is to not prove or claim anything, but to offer A) an intuitive grasp of non-integer powers and B) to show why the need of such intuitive grasp is hindering our use of math as a tool, and why letting go of it, instead understanding that only some of math has a real-world analog or an intuitive explanation and the vast majority is an extension without, is useful and productive.



So, to recap the A) point, in the hopes to clear any confusion, because me fail English often:

We can define non-integer powers like ab = exp(b·loge(a)).  Indeed, computers typically calculate arbitrary real powers ab = 2b·C·log2 a, where C is a constant (C = loge 2).

While exp(x) is actually ex, where e is the number known as Euler's constant (approximately 2.71828), this is not a cyclical argument, because we can define, and understand, exp(x) and loge(x) differently, as functions that we can define without relying of non-integer powers at all.

Indeed, exp(x) is the curve that has slope x at x, and has value 1 at exp(0).
Similarly, loge(x) is the curve that has slope 1/x at x, and has value 0 at loge(1).

(Exactly why and how this is so, requires more math, and goes beyond the scope here.)

For example, if you needed to calculate exp(x) for some x by hand, you could do so by using the series definition, exp(x) = 1 + sum xk / k! for k = 1, 2, 3, ... and so on, where k! is the factorial of k (product of all integers from 1 to k, inclusive).

While we do have some series we can use to calculate loge(x), they are too slow (need too many terms) to be practical.  Instead, we used to use tables of logarithms and exponentials instead, y = exp(x) ⇔ x = loge(y) (listing both y and x), based on pre-calculated exponentials. However, log2(x) = loge(x) / C, is much easier to calculate.  Indeed, computers typically calculate loge(x) = C·log2(a) instead.

(For the exact description of how to calculate log2(x), see e.g. the Wikipedia Binary logarithm article.  Most computers approximate real numbers with floating point numbers, where x = m·2b, where m is the mantissa (and normally represents a value between 0.5 and 1.0) and b is the exponent.  The binary logarithm is especially powerful for numbers expressed in this form.  For example, since 1987 or so, the Intel x86 (and x86-64 or AMD64) processor families have had it in hardware: a machine instruction FYL2X that calculates the binary logarithm of a given value, and another, FYL2XP1, that calculates the binary logarithm of one plus the given value, for even more accurate results near 1.)

To recap point B), most mathematical tools do not really have real-world analogs.  We can use integers for counting, and rationals for ratios, but what about irrationals: real numbers that cannot be represented exactly by any ratio?  We know π, and it is irrational, so they are definitely useful.  Earlier in this thread, I mentioned the Lambert W function, which isn't really a function because we cannot write it in form W(x)=something at all, and belongs to a group called generalized functions, or more properly, distributions (but don't confuse them with statistical distributions; they have some similar properties but are a different thing in math).  Many tools in math can be considered generalizations of the things that do have real-world analogs, of the things we can grasp intuitively, but cannot themselves be grasped intuitively (like irrational numbers).

I myself have never been good at math.  I might say I'm good at applying the math I know to solve problems, but there are lots and lots of mathematicians that can actually create new mathematical tools!  I believe that having the need for real-world analogs was hindering me for years, until I understood and accepted that not everything has such, because they are more like extensions; like using a waldo arm instead of your own arm to manipulate hazardous materials, except for your mind.
« Last Edit: June 01, 2020, 05:02:32 am by Nominal Animal »
 

Offline magic

  • Super Contributor
  • ***
  • Posts: 2121
  • Country: pl
Re: Raising a number to a non-integer power.
« Reply #50 on: June 01, 2020, 07:39:01 am »
there is only one the fulfills the standard arithmetic rules of addition and subtraction in the exponent for both integers and non-integers (reals).
That's what I meant :)

And as it happens, this suffices to define arbitrary powers, not just ex. Then you can show the exp/log trick as a convenient way of calculating arbitrary powers to whatever precision that's provided by your log tables, but not as the definition.

Defining ab as exp(b·ln(a)) is just :scared:

edit
There is another advantage to avoiding the exp/log madness: a direct definition gives a straightforward, constructive method for calculating arbitrary real powers to arbitrary precision. Take some integer powers and roots, in case of an irrational exponent calculate a limit (algebraically or numerically), done. A trained monkey could do that.
With exp/log, you are entirely at the mercy of your log tables or calculator in terms of precision (and accuracy :P). You are not going to calculate exp yourself starting from your (f' = f, f(0)=1) definition and trying to use the ex definition you will quickly realize why I insist that it's circular :)
« Last Edit: June 01, 2020, 08:14:44 am by magic »
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 1705
  • Country: fi
    • My home page and email address
Re: Raising a number to a non-integer power.
« Reply #51 on: June 01, 2020, 10:01:46 am »
Take some integer powers and roots, in case of an irrational exponent calculate a limit (algebraically or numerically), done. A trained monkey could do that.
I don't like that approach for two reasons.  First is that it can give the impression that irrational exponents are somehow special; and we both know they're not.  Second is that Nth root itself (root extraction) is a very nontrivial operation. Essentially, to calculate A1/n, you start with some guess x0, and then iterate xk+1 = ((n-1)·xk + A/xkn-1, until you have a good enough approximation.  (To explain what that is, one needs to know what recurrence formulae are, and about Newton's method of finding roots of a function; it opens up a whole another can of math tools.)

Plus, when you do more than one approximation at different phases of your calculation, the error becomes very hard to estimate.  Then, when you deal with a coincidence like eπ-π, and you do two or three or more approximations when calculating it, you can be tempted to second-guess yourself and claim eπ-π=20.  It isn't, it's just a coincidence in decimal base; it's actually eπ-π ≃ 19.99909979.

And don't even think about saying it's close enough, or we'll have to talk about how 640k is enough for everyone.  ::)

You are not going to calculate exp yourself starting from your (f' = f, f(0)=1) definition
No, but I have used the series sum.  It is the logarithm part that needs the tables, because they're too onerous to calculate by hand.  On a computer, however, both base-2 exponent and logarithm are much simpler, when floating-point numbers are expressed as m·2b.  I've actually done that by hand, too, I think. (To convert a real into binary, just convert the integer part first, successively dividing by two and adding the remainder in increasing order of significance (right to left, starting at just left of the decimal point).  Then, for the fractional part, multiply it by two, and extract the integer part – it is always 0 or 1 – repeatedly, adding one binary digit (from left to right, starting at just right of the decimal point) per iteration.  Then, apply the binary logarithm algorithm.  In all, it isn't hard to do by hand, because both involve just halving or squaring a value, no other multiplications or divisions.)

An aside: It is funny how some things are easier in binary than in decimal.  For example, there is a known method for extracting an arbitrary hexadecimal digit of Pi, without knowing any of the preceding (more significant) digits; yet, no such method is (at least as of this writing) known for decimals.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 15229
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Raising a number to a non-integer power.
« Reply #52 on: June 01, 2020, 03:57:33 pm »
You are not going to calculate exp yourself starting from your (f' = f, f(0)=1) definition and trying to use the ex definition you will quickly realize why I insist that it's circular :)

Erm, can, and do?

The definition is directly the conditions needed to apply Taylor's theorem.  And as a theorem, it's simply an equivalent representation, it's nothing new.

(Indeed this is a better application of computing truncated series, than the mentioned powers-and-roots approximation to irrational powers.  Not in that it's wrong, just that this is a heck of a lot faster.)

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline magic

  • Super Contributor
  • ***
  • Posts: 2121
  • Country: pl
Re: Raising a number to a non-integer power.
« Reply #53 on: June 02, 2020, 10:21:28 pm »
Okay, you guys would, but a monkey wouldn't :P Sorry for the confusing post yesterday.

What I mean is that one definition essentially is an algorithm (fastest or not), the other is some differential equation which I am supposed to know how to solve before even thinking about calculating anything.

Even if you make the obvious fix and simply define exp as the usual power series, that's still a nasty monstrosity which bears little resemblance to anything most people would consider a "power". If I ask what's exp(½ln(4)), you will produce quite a wall of text to arrive at the correct solution or use a proof by authority that your mysterious series somehow agrees with my definition and then use the properties that I enumerated. So much for eating your dog food :)

Now to the interesting stuff :popcorn:

There is something special about the irrationals: they are the limits of rational sequences which appear to be convergent despite having no limit among the rationals ;) That's a somewhat informal statement of one of the many formal definitions in circulation; smart people some 150 years ago figured out that this is all we need to do anything that needs to be done with the irrationals. Others definitions aren't much better, before you ask.

Conveniently, it means that any continuous function on the rationals can be uniquely extended to all reals. Including addition and multiplication, as it happens. Yes, you can write a power series like Σ(πn/n!) and your maths teacher promised you that such a real number exists, but that's all - this number is some infinite abomination which can't be computed and compared to 20+π. As soon as you try that, either analytically or numerically, you are replacing your neat formula with a contraption like limx→π(Σ(xn/n!)). And if you try numerically, once more you have an iterative approximation nested inside another iterative approximation and two sources of numerical error to worry about.

Quote
octave:1> exp(3)-3
ans =  17.086
octave:2> exp(3.1)-3.1
ans =  19.098
octave:3> exp(3.14)-3.14
ans =  19.964
octave:4> exp(3.141)-3.141
ans =  19.986
octave:5> exp(3.1415)-3.1415
ans =  19.997
octave:6> exp(3.14159)-3.14159
ans =  19.999

That looks like it could very well be 20 ;)
 

Offline msuffidy

  • Contributor
  • Posts: 9
  • Country: ca
Re: Raising a number to a non-integer power.
« Reply #54 on: June 03, 2020, 04:52:03 am »
Pretty sure it is part of a logarithmic curve when you are between two exponents. There is some stuff on YouTube about weird ways to manipulate usual things like 0 to the 0 power something to the negative power, something to an non integer power etc. Most of them are either logical or undefined.
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 1705
  • Country: fi
    • My home page and email address
Re: Raising a number to a non-integer power.
« Reply #55 on: June 03, 2020, 07:42:51 am »
I understand your point, magic, but I disagree; not because I have a different opinion, but because I think your approach leads to problems when trying to understand  more complex mathematical "stuff".

If it was just a matter of opinion or different experiences, different opinions would be just useful, because people do think and learn in different ways.

First, a couple of points:
What I mean is that one definition essentially is an algorithm (fastest or not), the other is some differential equation which I am supposed to know how to solve before even thinking about calculating anything.
Using a ratio to approximate a real number, then calculating the power as the denominator'th root of the nominator'th power of the value, is itself an algorithm.  Calculating an N'th root of a value is nontrivial; quite a lot of work, really.

Even if you make the obvious fix and simply define exp as the usual power series
No, I did not, and would not.  The intuitive or real-world definition of the exponential function is "the curve which has value 1 at x=0, and slope x at x".  The power series is just one way to apply it or evaluate it: to calculate a specific point on that curve.

Now, back to the core disagreement.

OP asked how to intuitively grasp ab, when b is not an integer.  They intuitively grasp the case where b is an integer, as multiplying a by itself b times.

If I understood you correctly, your point is to just approximate b with a ratio, c/d, so that abac/d, in which case ab is approximately equal to the d'th root of ac.

I disagree with that, because it gives an incorrect intuition about the continuity and other properties of exponentials and real powers; intuitions, that will cause difficulty in understanding more in-depth mathematical concepts.

(My objection is similar to the one when teachers tell kids that electrons orbit nuclei like planets orbit the sun.  They do not.  Electrons do have properties like angular momentum and orbital radius that make the orbit model one that gives a good intuitive grasp of the properties of such electrons, but the fact is, they're delocalized in a region around the nuclei in manner better examined using quantum mechanics, and are definitely not just whizzing around like a rock around a gravity well.  It is an analog that works in one specific situation – when considering electron angular momentum and orbital properties – but is a hindrance when trying to understand anything else about atoms and molecules.  Physicists like me don't get weirded about this, because we learn to use different analogs depending on the situation, and understand that those are just tools to help us think, and not a representation of reality.)

My own suggestion is basically this:

The "best" one (that makes any further math easier to integrate to ones understanding and mathematical toolbox), is to just consider non-integer powers as an "extension" of the integer ones, with exactly the same rules and behaviour.  That is, to understand, that not every mathematical tool has an intuitive real-world analog; that requiring such intuition can hinder ones use of math.  In math, it is perfectly okay to multiply a by itself 2.1276352 times, because fractional "numbers of times" are just an extension of integer number of times, and have the exact same properties.  The fact that 2.1276352 is not countable – that is, you cannot have 2.1276352 items, because it is not a natural integer – is just completely irrelevant in this context.

The answer to exactly how to multiply something by itself a non-integer number of times, is via a mathematical identity: ab = eb loge a, where ex ≝ exp(x) is a curve that has slope x at x=x, and exp(0) = 1; and where loge x is a curve that has slope 1/x at x=x, and loge 1 = 0.  We have several different tools for calculating any point on those curves.

In fact, when you tell a current computer to calculate ab for you (in C, pow(a, b); in Python, a**b; and so on), it actually uses base-two exponent and logarithm: ab = 2b log2 a.  Mathematically, 2x = eC x and log2 y = C loge y, where C is a constant, C = 1 / loge 2.  It turns out there are very fast and efficient techniques, or algorithms, to calculate base-2 exponentials and logarithms, when numbers are expressed in binary floating-point format, m·2b.  The IEEE-754 standard defines two, Binary32 and Binary64, that use exactly this form, and these are used by almost all current computer architectures (as "float" and "double" real types, typically).  Intel x86 and AMD64 processor architectures include machine instructions that do these operations in hardware, and have had these for decades.

See?  I understand why one would see the root-of-power approach better, even more powerful, but I don't like it because of how it can affect ones further understanding of math.  I like to separate the what and the how, with an approach for understanding the what that isn't likely to bite oneself in the ass later on.

Of course, if one can take both models, and simply switch between them, they're way ahead of either of us already (since we're still here discussing which one to use), and can use such analogs themselves as tools, switching them as they need – if they need such analogs at all.  But I suspect that those people are good at math anyway, and don't need our help!
« Last Edit: June 03, 2020, 07:51:59 am by Nominal Animal »
 

Offline magic

  • Super Contributor
  • ***
  • Posts: 2121
  • Country: pl
Re: Raising a number to a non-integer power.
« Reply #56 on: June 03, 2020, 01:45:17 pm »
The "best" one (that makes any further math easier to integrate to ones understanding and mathematical toolbox), is to just consider non-integer powers as an "extension" of the integer ones, with exactly the same rules and behaviour.
I agree, plus the particular rules and behaviors you want to generalize ought to be listed so that there is no doubt and confusion.

Moreover, in any remotely serious mathematics, it is also considered a good idea to convince yourself and the reader that such a function is even possible in the first place, and there is no better way than defining it and verifying that it meets all the requirements.

The answer to exactly how to multiply something by itself a non-integer number of times, is via a mathematical identity: ab = eb loge a, where ex ≝ exp(x) is a curve that has slope x at x=x, and exp(0) = 1; and where loge x is a curve that has slope 1/x at x=x, and loge 1 = 0.  We have several different tools for calculating any point on those curves.
Yes, you can, but there is a problem: you typically cannot calculate ex exactly unless x comes in the form x=ln(y). This complicates some simplest examples possible, like 4½. At some point it's convenient to just admit that fractional powers are simply roots.

So yes, you have defined the function and provided the "how", but it's not even clear if it meets your own "what" criteria without bringing in some calculus heavy artillery, which no beginner would understand if you actually tried to explain. That's the Arduino approach to mathematics, I guess I'm just not a fan of Arduino :P

You've got me on one point: I utterly glossed over the problem of continuity / monotonicity / etc. Why would my function be continuous on the rationals? Is it even true that a½<a<a¾? I believe those problems are solvable by elementary means (like converting the fractions to a common denominator, and others), which means that if you want a truly honest definition, with no cheating, handwaving and appeals to authority, this looks like a promising direction.

And yes, it will take limits to get to the irrationals. But limits are either explicit or implicit in pretty much everything dealing with the irrationals. The irrationals are pure cancer IMO and one shouldn't feel bad about treating them like they are some kind of cancer. Most of the time you too don't deal with the irrationals, you just compute e3.1415926536 instead and call it a day.

And no, I certainly didn't say to approximate an irrational with a fraction and leave it at that. That's not what limits are :P
« Last Edit: June 03, 2020, 01:54:29 pm by magic »
 

Offline GlennSprigg

  • Frequent Contributor
  • **
  • Posts: 829
  • Country: au
  • Medically retired Tech. Old School / re-learning !
Re: Raising a number to a non-integer power.
« Reply #57 on: June 03, 2020, 02:18:48 pm »
To me, simple INTEGERS are enough to bamboozle most!  ;D
10^24     Approx number of atoms in an average adult human being.
10^50     Approx number of atoms in our Earth.
10^80     Approx number of atomic particles in the 'known' Universe!
10^124   Approx number of Protons, if the 'known' Universe was a SOLID!!
10^100   Was named a 'Googol' just for fun, by a scientists son.
A 'GoogolPlex' was then decided to be 10^Googol...  That's just beyond stupid!  :-DD
 

Offline Circlotron

  • Super Contributor
  • ***
  • Posts: 1848
  • Country: au
Re: Raising a number to a non-integer power.
« Reply #58 on: June 03, 2020, 10:48:49 pm »
Googolplex in popular culture:
Quote
"Clara was one in a million... One in a billion... One in a googolplex... The woman of my dreams, and I've lost her for all time."
—Doc Brown
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 15229
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Raising a number to a non-integer power.
« Reply #59 on: June 03, 2020, 11:51:51 pm »
This looks like a good point to add my "'real numbers' are the least real number system" rant...  :blah: :-DD

To know a truly real number, is to know the infinite madness that is darkness itself... to know the wisdom of The Old Ones...

Rational numbers, within reason, we can conceive of -- as long as we can put a number to it, or an approximate range, that's fine.  The algebraic numbers are a little more tricky, with more operations involved in their creation -- but still only finitely many operations, be it exponentiation (aha, see it's still on topic!) or what.

The computables are even more difficult, with such monsters as Graham's number cropping up even from relatively simple criteria.  Obviously the large numbers are quite sparse in the computables, but vastly more sparse is any other random real number -- to be able to compute a number, we must have some code, algorithm, proof, or even just proposition, which implies the existence of the number in question -- no such criterion is needed for a general real number.

The few real numbers we know, are all constructed based on their relationships.  Pi is very useful because it has many equivalent relationships, from geometry to complex analysis and beyond.  It is well known, of course never exactly as we cannot enumerate all the decimals of a transcendental real number -- but its strength is only rarely in its numerical value, and more fundamentally among the many facets of mathematics it connects.

Similarly for e, gamma, etc.

One of the few truly real, non-computable numbers that we can even begin to grasp, is: https://en.wikipedia.org/wiki/Chaitin%27s_constant  Which, because we know [upper bounds] on the first few BB(n) numbers, we have an approximate value for already -- but it's patently clear that we can't know, really much more than that, like, even a decimal more, but perhaps proofs will be developed that give just a few and then it's provable that further development (even given universe-sized recursive proofs) is realistically impossible.

Now consider that, for as many numbers as a googolplex, there are far more numbers than that, just among the rationals between 0 and 1; but compared to the number of uncomputable reals in the same range, even that infinity has measure zero, and not just laughably so, but trivially so!

P.S. My spell check wants to correct "uncomputable" to "uncomfortable".  That is understandable.  :scared:

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: hamster_nz

Offline hamster_nz

  • Super Contributor
  • ***
  • Posts: 2282
  • Country: nz
Re: Raising a number to a non-integer power.
« Reply #60 on: June 04, 2020, 09:19:58 am »
One of the few truly real, non-computable numbers that we can even begin to grasp, is: https://en.wikipedia.org/wiki/Chaitin%27s_constant

Thanks for that Wikipedia wormhole  :)... I've never heard of it till now.
Gaze not into the abyss, lest you become recognized as an abyss domain expert, and they expect you keep gazing into the damn thing.
 

Offline magic

  • Super Contributor
  • ***
  • Posts: 2121
  • Country: pl
Re: Raising a number to a non-integer power.
« Reply #61 on: June 04, 2020, 10:06:37 pm »
Now consider that, for as many numbers as a googolplex, there are far more numbers than that, just among the rationals between 0 and 1; but compared to the number of uncomputable reals in the same range, even that infinity has measure zero, and not just laughably so, but trivially so!
Screw computability; most irrationals can't even be individually described and identified by any finite text or formula in any language in existence. Some people got quite upset when one Cantor raised this issue some 150 years ago ;D

You can have sets of real numbers which can't be assigned any length/area/volume because every possible value from zero to infinity leads to one or another paradox. And many mathematicians will tell you with a straight face that from a few such unmeasurable sets in a 3D space it is possible to assemble various measurable sets of different volumes just by moving and rotating them around. Some others feel a bit uneasy about that idea, though.
 

Offline CatalinaWOW

  • Super Contributor
  • ***
  • Posts: 3591
  • Country: us
Re: Raising a number to a non-integer power.
« Reply #62 on: June 04, 2020, 11:42:58 pm »
There is so much esoterica in advanced mathematics.  I find it challenging enough to understand and use the crumbs that very bright people pull out of that heap and show the real world applications to us mere mortals.  Distributions, contour integrals and a whole list of other tools.  But those people are made to pay for their sins.  In grad school I took several advanced mathematics courses in aid of understanding the limits and applications of those crumbs.  The courses were owned and taught be the mathematics department.  But 80-90% populated by engineers and physicists.  Which irked the mathematicians no end.  And caused immense disdain for their colleagues who continued finding and disseminating those crumbs.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 15229
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Raising a number to a non-integer power.
« Reply #63 on: June 05, 2020, 02:18:49 am »


Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: magic

Offline CatalinaWOW

  • Super Contributor
  • ***
  • Posts: 3591
  • Country: us
Re: Raising a number to a non-integer power.
« Reply #64 on: June 05, 2020, 03:49:53 am »
Very good opening.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf