cancel
Showing results for
Did you mean:
New member
3 2 0 1
Message 1 of 9
1,663
Flag Post

# HP Prime - trouble solving and graphing odd roots of negative numbers

HP Recommended
HP Prime Graphing Calculator

When I attempt to solve or graph the function of an odd root of a negative number I get an error and it only graphs for x>0.  For example:  f(x) = x^(1/3) you only get the positive values of x.  However, when written in radical form you get the correct answer and graph.   I'm not sure how to enter a radical sign here, but if you solve for the cube root of (-8) you get -2, which is correct.  But if you write it in exponential form, (-8)^(1/3), you get an error.

Anyone else have this problem and how to correct this?  Thanks!

Tags (1)
8 REPLIES 8
Level 9
3,551 3,490 180 541
Message 2 of 9
Flag Post
HP Recommended

Hi!, @Snakehandler :

You can see, the imagen from HP PRIME and Wolfram Alpha, as ...

Kind Regards !.
Have a nice day !.
Provost in HP Spanish Public Forum ... https://h30467.www3.hp.com/
New member
3 2 0 1
Message 3 of 9
Flag Post
HP Recommended

Thanks for your response, @Make.  But why is the answer not -2 for both in my example below?

Level 9
3,551 3,490 180 541
Message 4 of 9
Flag Post
HP Recommended

Hi!, @Snakehandler :

You can see, the imagen of how obtein your result (-2).

Kind Regards !.
Have a nice day !.
Provost in HP Spanish Public Forum ... https://h30467.www3.hp.com/
New member
3 2 0 1
Message 5 of 9
Flag Post
HP Recommended

I'm sorry, but this does not help.  -2^3 is not the same as (-2)^3, even if the results are equivalent.  -8^(1/3) is not the same as (-8)^(1/3), although the answer to both should be -2.

But my original question remains:  Why does (-8)^(1/3) not equal -2, but instead gives you an imaginary number?

Level 8
622 609 117 207
Message 6 of 9
Flag Post
HP Recommended

@Snakehandler wrote:

But my original question remains:  Why does (-8)^(1/3) not equal -2, but instead gives you an imaginary number?

There is a reason, but it's not a mathematical reason, but rather a tool useability reason.  Sometimes users need to know the principal root (that is, the root with the smallest angle above the real axis), and sometimes users need to know the real root.  As you noticed, when the root is an odd integer, and the argument is negative, these results are different.  So HP long ago decided to give us two different tools to get whichever one we needed.  If you need the principal root, use fractional powers.  If you need the real root, use the root function.  This dichotomy applies to keyboard calculations, programs, and graphing.

In other words, it's not a bug, it's a feature... but unfortunately it's a feature that has been around so long that HP has forgotten to mention it in some of their calculator manuals.

Disclaimer: I don't work for HP. I'm just another fan of HP calculators.

-Joe-
Level 9
3,551 3,490 180 541
Message 7 of 9
Flag Post
HP Recommended

Hi!, @Snakehandler :

Don't worry!. Be Happy!.

See, the result's from Wolfram Alpha, from ...

Kind Regards !.
Have a nice day !.
Provost in HP Spanish Public Forum ... https://h30467.www3.hp.com/
Level 6
252 251 42 77
Message 8 of 9
Flag Post
HP Recommended

Hello,

> Why does (-8)^(1/3) not equal -2

If you think about the problem backward, what numbers, put to the 3rd power, will yeild -8, you will find 3 answers. 1+sqrt(3)*i, -2 and 1-sqrt(3)*i.

This pauses a problem as "power" is a FUNCTION. ie: a mathematical construct that associate one SINGLE value to a set of inputs.

So, mathematician, when they defined what the power function is, had to choose one of the N answers as the univessaly agreed upon one. They have choosen/decided that the 'proper' answer to power(a, b) in cases such as a=-8 and b=1/3 would be the "first root" (1+sqrt(3)*i) of the sollution set to the reverse problem.

It can look strange when you come from the "non complex number" world as -2 seems to be a simpler/easier sollution. One also gets his mind "oriented" by the fact that teachers (semi-eroneously) intruduce fractional power as an "explanation" of rational nth roots...

However, mathematician have very good reasons for their decision. Among other things continuity. power(a,b) when b varies, will be continuous if you take the mathematician's definition, not if you use the nth rooth...

This shows once again that teaching 1/2 truth without mentionning it is not a good idea as it quickly gets confusing 🙂

(To ilustrate this in an other domain, here is a discussion I had with my kid's teacher who taught himthat plannet's orbits are circles (especially as my kid is, like me an amateur astronomer and knows better):

- Me: Please do Don't teach my kid false "facts"

- Him: The reality (it's an elipse) is to complicated as they do not know what an elipse is:

- Me: Plannets do NOT orbit in elipses, but in elipse like tragectories. Why don't you just say: "they orbit in "deformed" circles, or they orbit on tragectories that are close to circles, or anything along these lines. At least it would not be incorrect, while still beeing at their level"

- Him: What do you mean orbits are not elipses!

)

So, here you go, to go back to the original topic, Prime gives the "official" mathematician answer, and for good reasons.

If you want to perform a nth root calculation, then you can use the nth root function which is there exactly for that case.

Cyrille

I am an HP Employee
New member
1 1 0 0
Message 9 of 9
Flag Post
HP Recommended

You’re wanting to find the 3rd root of a negative number. The 3rd root of a number has three roots, one real and two complex. If you were looking for the the 4th root of a number there would be one real root and three complex roots. The first root of a negative number is complex. That’s why the HP gives you a complex root as the answer if you want to find the 3rd root of -8. The first root, of the three roots for this particular number (-8) is complex, the second root is real (the -2 you’re looking for) and the third root is complex. All numbers have both real and complex roots. Remember, the first root of a positive number is real. The first root of a negative number is complex, the second root is real. For example, the cube root of -27 is:

1.500+2.598i (first root);   -3 (second root);  1.500-2.598i (third root).  If you ask for the cube root of -27 on my HP 28S the answer you get is 1.500+2.598i. I wrote a program to give me all the roots of any real or complex number and return them to the stack in the correct order for my HP 28S. Leads to less confusion for me.

† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation