Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

HPs mis-calculate fractional exponents?

6 views
Skip to first unread message

Nick

unread,
Sep 29, 2007, 2:42:51 AM9/29/07
to
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?

dave

unread,
Sep 29, 2007, 5:35:15 AM9/29/07
to
Try y=x^(4/5)

or y=x^0.8 and let us know if it works better.
--

Nick

unread,
Sep 29, 2007, 6:21:13 AM9/29/07
to

Nope same problem with or without parentheses. And my original post
should have had the parentheses; I was used to the 50G making
everything look pretty.

Nick

unread,
Sep 29, 2007, 6:30:34 AM9/29/07
to
On Sep 29, 2:35 am, dave <d...@amd.localhost.comcast.net> wrote:

Oh, and in case it's helpful, both my 48gx and 50g give me about
-1.409 + 1.023i as the result of -2^.8, though I'm not sure why.
Apparently it's evaluating the 5th root of -2 as (5th root of 2)
(e^(i*pi/5)).

Thanks for any ideas.

Nick

unread,
Sep 29, 2007, 6:35:09 AM9/29/07
to
On Sep 29, 3:30 am, Nick <n...@hughes.net> wrote:

>
> Oh, and in case it's helpful, both my 48gx and 50g give me about
> -1.409 + 1.023i as the result of -2^.8, though I'm not sure why.
> Apparently it's evaluating the 5th root of -2 as (5th root of 2)
> (e^(i*pi/5)).
>
> Thanks for any ideas.

and by -2^.8, I of course mean (-2)^.8

:)

sc_u...@hotmail.com

unread,
Sep 29, 2007, 12:09:51 PM9/29/07
to

Try graphing (x^4)^(1/5). This will force a real answer so the domain
will be (-infty, +infty).

S.C.

mats

unread,
Sep 29, 2007, 1:13:10 PM9/29/07
to

opticsmith

unread,
Sep 29, 2007, 1:54:02 PM9/29/07
to

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

dave

unread,
Sep 29, 2007, 2:00:17 PM9/29/07
to
My 48gx computes the same value of 2^.8 as yours does. But this seems
correct to me. Try plotting y = re(x^.8). The RE function is described
on page 12-14 of the 48g Series User's Guide.
--

JYA

unread,
Oct 1, 2007, 1:55:11 AM10/1/07
to
On 2007-09-29 03:30:34 -0700, Nick <n...@hughes.net> said:
> Oh, and in case it's helpful, both my 48gx and 50g give me about
> -1.409 + 1.023i as the result of -2^.8, though I'm not sure why.
> Apparently it's evaluating the 5th root of -2 as (5th root of 2)
> (e^(i*pi/5)).

This is a FAQ ....

>
--
They who would give up an essential liberty for temporary security,
deserve neither liberty or security (Benjamin Franklin)

Saturn rising

unread,
Oct 1, 2007, 7:04:09 PM10/1/07
to
Nick wrote:

> I noticed an issue when I tried to graph y = x^(4/5) on my 50G.
> it only showed points [for positive X]

A challenge for explainers:

Consider 'XROOT(5.,X^4.)'

Explain why this plots a complete graph on the HP48
but only for positive X on the HP49/50 (VER 4.20060919)

While '(X^4.)^(1/5.)' plots a complete graph on all calculators.

How can this not be a bug in XROOT?
(as to flag settings, do CASCFG before plotting)

-=-=-=-

0 new messages