X^(1/3) plots differently than the cubic root of x
04-07-2015, 02:46 AM
Post: #1
 Gene222 Member Posts: 99 Joined: Feb 2015
X^(1/3) plots differently than the cubic root of x
I used the function app and plotted the cubic root of X and got a normal graph as shown in the attachment. However, when I plotted the equivalent equation of X to the 1/3 power, only the positive values of X and f(x) were plotted, as shown in the second attachment. Why was only half of the graph plotted for the equation X to the 1/3 power?

Attached File(s) Thumbnail(s)  04-07-2015, 04:32 AM (This post was last modified: 04-07-2015 04:38 AM by Joe Horn.)
Post: #2 Joe Horn Senior Member Posts: 1,611 Joined: Dec 2013
RE: X^(1/3) plots differently than the cubic root of x
(04-07-2015 02:46 AM)Gene222 Wrote:  I used the function app and plotted the cubic root of X and got a normal graph as shown in the attachment. However, when I plotted the equivalent equation of X to the 1/3 power, only the positive values of X and f(x) were plotted, as shown in the second attachment. Why was only half of the graph plotted for the equation X to the 1/3 power?

This is a constant source of confusion. Although X NTHROOT Y is identical to Y^(1/X) in mathematics, they are NOT the same in HP calculators, because HP gives you the option of using one or the other depending on whether you only want real results, or allow complex results: The NTHROOT function is a special function in HP calculators. It always returns the real root, never a complex root. If no real root exists, then NTHROOT errors. But Y^(1/X) always returns the principal root, that is, the one with the smallest angle when expressed in polar notation. For square roots that's the same as NTHROOT, but for any larger root of a negative number, it'll be complex. When plotting a function, complex results of course are not graphed, and that's why those points are "missing" from your plot.

So choose your function wisely. If you want only real roots, use NTHROOT. If you want principal roots, use Y^(1/X). Again, that's not a mathematical difference; it's strictly an HP calculator phenomenon, which always confuses new users until they realize the reason that HP offers that choice.

Disclaimer: Future firmware versions of CAS may or may not keep this long-standing tradition, because unexpected changes are all part of the fun of learning how to use the Prime. And what CAS does is always a surprise, no matter how long you've used Prime. So be sure to try both NTHROOT and Y^(1/X) in both Home and CAS with each new version before assuming how they behave. *sigh*

FWIW, the HP 50g is even more confusing, because it returns -2 for XROOT(3.,-8.), but returns 2*((1+i*sqrt(3)/2) for XROOT(3,-8), the only difference in the inputs being the presence of decimal points! Ugh!

EDIT: In case it isn't obvious, -8 has THREE cube roots, not just one. In polar notation, they are 2 at 60 degrees, 2 at 180 degrees, and 2 at -60 degrees. 2 at 180 degrees is equal to the real number -2; the other roots are complex. So "the graph of the cube root of X" is not as simple as you are implying; every X (except 0 and 1, of course) has three cube roots. If you only want the real ones, use NTHROOT. If you use powers, you'll be generating the complex roots, which can't be plotted on the real plane.

<0|ɸ|0>
-Joe-
04-07-2015, 04:37 AM
Post: #3 mandresve Member Posts: 92 Joined: Mar 2015
RE: X^(1/3) plots differently than the cubic root of x
(04-07-2015 02:46 AM)Gene222 Wrote:  I used the function app and plotted the cubic root of X and got a normal graph as shown in the attachment. However, when I plotted the equivalent equation of X to the 1/3 power, only the positive values of X and f(x) were plotted, as shown in the second attachment. Why was only half of the graph plotted for the equation X to the 1/3 power?

Hi Gene222, the problem lies in the interpretation of the calculator. Most computational algebraic programs interpret the cubic root of X takes only real values, approaching both infinite and from negative infinity. When you write it Alternatively, the CAS may want to interpret it as the complex values of the equation. Look at the example I made in wolfram.

Attached File(s) Thumbnail(s)   Success is the ability to go from one failure to the next without any loss of enthusiasm.
 parisse Senior Member Posts: 1,093 Joined: Dec 2013