Re: HPs mis-calculate fractional exponents?
- From: opticsmith <opticsmith@xxxxxxxxxxxxxx>
- Date: Sat, 29 Sep 2007 10:54:02 -0700
On Sep 29, 2:42 am, Nick <n...@xxxxxxxxxx> wrote:
I noticed an issue when I tried to graph y = x^4/5 on my 50G. My
calculator graphed it, but it only showed points in the domain
[0,infinity). Nothing at all in the second quadrant, like I would
expect. Detective that I am, i tried -2 to the 4/5. Sure enough, my
calculator gives me something in terms of an imaginary number. This
happens in both symbolic and numeric mode as far as I can tell, and if
I do 5th-root of -2, and then raise that to the fourth power, it works
fine. I checked, and my 48GX does this, too.
What am I missing here? Is there a way to make them do this properly?
It's a definition issue. When you raise a number to a power other than
an integer, you are basically jumping into a domain of definition
which is much wider. 3^4 pretty unambiguously means "3*3*3*3", and in
fact you can do this with much more complex things, such as matrices.
Fractional powers are defined as follows, in almost all cases:
X^Y means exp(Y*ln(X))
For positive numbers this is fine and we don't need to jump from the
real numbers to the complex ones (although we could!). However, in
general and always for negative (or complex) numbers X, the logarithm
has an imaginary part. This arises because the logarithm is itself
defined as an inverse function: "What number Z solves the equation
exp(Z) = X" is the definition of Z = ln(X).
There are more than one answer to this, namely, ln(|X|) + i*2*n*pi for
positive X and others for negative or complex X. Here n is any
integer.
So. For negative x, your function W(x) = x^(4/5) has answers
exp(0.8*ln(x)), i.e. exp(i*0.8*(1+2*n)*pi)*|x|^0.8.
For n = 0,1,2,3,4 there are distinct answers; for n = 5, you get the
same as 0, etc.. In other words, your function has 5 branches for
negative x. Note that, for n=2, you have the solution you seem to
expect: (1+2*2)*0.8 = 4, and exp(4*pi*i) = 1.
You can force the answer you want by explicitly avoiding getting into
the branch point issue by doing (x^4)^(1/5), since x^4 is always
positive (for real x).
Bottom line: the folks who wrote the programs behind the y^x key are
such subtle and excellent mathematicians that they have provided you
with a lesson in complex function theory (and me a pulpit ...;-) )
--Irl
.
- References:
- HPs mis-calculate fractional exponents?
- From: Nick
- HPs mis-calculate fractional exponents?
- Prev by Date: Re: HPs mis-calculate fractional exponents?
- Next by Date: Re: HPs mis-calculate fractional exponents?
- Previous by thread: Re: HPs mis-calculate fractional exponents?
- Next by thread: Re: HPs mis-calculate fractional exponents?
- Index(es):
Relevant Pages
|
Loading