The Museum of HP Calculators

HP Forum Archive 18

 fractional powers of negative numbersMessage #1 Posted by Edward McNally on 20 Nov 2007, 3:50 p.m. In preparing for a calculus exam, the text showed a graph of the function x^4/3 - 4x^1/3. The calculator showed no data for x<0 although the text had a graph extending from -4

 Re: fractional powers of negative numbersMessage #2 Posted by Hans de Moor on 20 Nov 2007, 5:57 p.m.,in response to message #1 by Edward McNally Edward, This has to do with how you treat integers vs real numbers in exponential functions. For a^1/n, Your calculator is using 1/n as a real number, not the nth root of a. Hans

 Re: fractional powers of negative numbersMessage #3 Posted by Chuck on 20 Nov 2007, 6:58 p.m.,in response to message #1 by Edward McNally This is a great calculus question, because many calculators and software programs don't always show what is expected. The reason it doesn't show the negative portion is because there are actually three cube roots of a number. Using DeMoivre's formula for roots, the first root (smallest angle in polar form) of a positive number is the positive root, so its plotted just fine. The first root of a negative number is complex, which is not plottable in the real plane. "Smart" calculators tend to give the complex root and thus give nothing for negative input. "Dumb" calculators stick with the "odd root of a negative is a neagive" idea, and plot the desired negative region. I'm pretty sure the HP50, TI89(?), Mathematica, all do not give the negative side. However, the "dumbed-down" TI84 gives the entire graph. Some work arounds... ```>> use the nth root button instead of x^(1/n) >> rewrite x^(4/3) as (x^4)^(1/3) >> on the HP35s write a negative number as -5i0, and then ^(1/n) ``` Good luck. But remember, you always need to be smarter than your calculator. It similar to the question of finding the all the solutions to the equation x^6-e^(.0001x) = 0 (or graphing the function on the left). Don't trust your calculator. Cheers. Edited: 20 Nov 2007, 8:58 p.m.

 Re: fractional powers of negative numbersMessage #4 Posted by Edward McNally on 21 Nov 2007, 12:38 a.m.,in response to message #3 by Chuck Thank you. I do realize the calculator must sometimes make a choice between various solutions. I will use your thoughts for further study, and to further understand my calculator - which is an almost unbelievable machine. Thanks again.

 Re: fractional powers of negative numbersMessage #5 Posted by Hal Bitton in Boise on 21 Nov 2007, 2:39 a.m.,in response to message #3 by Chuck Hello Gentlemen, FYI: My 50G plots the odd root of a negative number with no problem. (I plotted X^(1/3) from x=-14 to 14 and the result was plotted on both sides of the y axis (quadrants I and III), reflected about the origin. My 48G however, does not. It only plotted the values of x>0. With the 50G in exact mode, manually solving for -8^(1/3) on the stack gives me 2*e^(i*pi/3). Forcing a numerical evaluation gives me the vector [.9999, 1.732]. Interesting that the 50G will plot -2 as the cube root of -8, but will not display it when solved on the stack. Best regards, Hal

 Re: fractional powers of negative numbersMessage #6 Posted by Hal Bitton in Boise on 21 Nov 2007, 2:46 a.m.,in response to message #5 by Hal Bitton in Boise Quote: With the 50G in exact mode, manually solving for -8^(1/3) on the stack gives me 2*e^(i*pi/3). Forcing a numerical evaluation gives me the vector [.9999, 1.732]. My appologies, I meant to say the complex number [.99999, 1.732] :') Hal

 Re: fractional powers of negative numbersMessage #7 Posted by Meenzer on 21 Nov 2007, 3:41 a.m.,in response to message #5 by Hal Bitton in Boise Quote: Hello Gentlemen, FYI: My 50G plots the odd root of a negative number with no problem. (I plotted X^(1/3) from x=-14 to 14 [...] My 48G however, does not. Neither my 50G nor my 48G plot x^(1/3) in quadrant III. I suppose we have different flags set or otherwise different setups. Could you enlightend me on how to do it? Thanks in advance. I can however plot y= 3rd root of x in quadrants I and III on both the 48G and the 50G. Edited: 21 Nov 2007, 4:31 a.m.

 Re: fractional powers of negative numbersMessage #8 Posted by Giancarlo (Italy) on 21 Nov 2007, 4:24 a.m.,in response to message #5 by Hal Bitton in Boise Hi Hal. Quote: With the 50G in exact mode, manually solving for -8^(1/3) on the stack gives me 2*e^(i*pi/3) On my 50G, solving for (-8)^(1/3) in exact mode gives me 2*e^(i*pi/3)... Best regards. Giancarlo

 Re: fractional powers of negative numbersMessage #9 Posted by Edward McNally on 22 Nov 2007, 4:29 a.m.,in response to message #3 by Chuck Thanks for your help. First, using the root function helped. When I created Y(X)=1/3Root(x^4)-4*1/3Root(x), the calculator returns the real number answer for all x. However, it would still not graph for x<0. But then I did get "smarter" than the machine, to use your phrase. I defined two functions, Y1x)=1/3Root(x^4) and Y2(x)=-4*1/3Root(x). These both plotted correctly for x<0,x>0. Then, I created Y3(x)=Y1(x)+Y2(x)and, lo and behold, I got the complete graph. Thanks again.

 Re: OT: fractional powers of negative numbers in DERIVEMessage #10 Posted by Stefan K. on 27 Nov 2007, 8:45 a.m.,in response to message #3 by Chuck I had to check this problem with Derive for Dos (running on an Poqet PC Plus, btw a good replacement for a TI 92 if you allow non RPN every now and then): ```(-8)^(3/4) simplifies to 1 + sqrt(3) i ``` but ```solve(x^3=-8,x) will give you [x=-2,x=1+sqrt(3)i,x=1-sqrt(3)i] ``` ie. you can't plot x^(1/3) for negative values straight forward. Interestingly, (-8)^(4/3) is simplified to -8-8 sqrt(3)i, but no solution for x^(3/4)=-8 is found. I wish there would be calculator with complete implementation of complex numbers, and a way to specify the domains for the calculation. Till then you still need to use your brain...

 Re: fractional powers of negative numbersMessage #11 Posted by Meenzer on 21 Nov 2007, 1:27 a.m.,in response to message #1 by Edward McNally Quote: But I have no clue as to why I am getting these seemingly arbitrary "vector components" They are not "vector components", but complex numbers with real and imaginary part that should read 1+1.732*i and 1.5+2.598*i - I'm sure you knew that. Edited: 21 Nov 2007, 1:59 a.m.

 Re: fractional powers of negative numbersMessage #12 Posted by Karl Schneider on 21 Nov 2007, 2:31 a.m.,in response to message #1 by Edward McNally Edward -- The so-described "smart" calculators are returning the primary roots, whose polar-coordinate angles -- as measured counter-clockwise from the positive real axis of the complex plane -- are the smallest. The primary root of a negative number is complex-valued. Certainly, the negative real-valued root is also of interest if the range of the function is strictly real-valued. Calculators such as the HP-35s, HP-33s, and HP-33SII can also return the real cube roots of negative numbers, using the "x-th root of y" or cube-root functions. -- KS Edited: 21 Nov 2007, 3:21 a.m.

 Re: fractional powers of negative numbersMessage #13 Posted by Rodger Rosenbaum on 21 Nov 2007, 4:26 a.m.,in response to message #12 by Karl Schneider Quote: The so-described "smart" calculators are returning the primary roots, whose polar-coordinate angles -- as measured counter-clockwise from the positive real axis of the complex plane -- are the smallest. The primary root of a negative number is complex-valued. I've always seen it called the "principal" root.

 Re: fractional powers of negative numbersMessage #14 Posted by Karl Schneider on 25 Nov 2007, 4:24 a.m.,in response to message #13 by Rodger Rosenbaum Hi, Rodger -- Oops! A "misremembering" of accepted terminology on my part. "Principal" does make more sense than "primary", when one considers it. "Principal" = "chief of, or among, many", as in principal of a school, or a Principal Engineer. "Primary" = "first stage", as in primary education, primary election, or primary sewage treatment. Of course, the principal root is also the first, or primary, root in the order of identification (lowest positive angle in the complex plane). Less than a year ago, I got the term right: -- KS

 Re: fractional powers of negative numbersMessage #15 Posted by Rodger Rosenbaum on 21 Nov 2007, 4:37 a.m.,in response to message #1 by Edward McNally There's an easy way to see all the nth roots of a negative number on the HP48G and descendants such as the HP50G. Let's say you want the nth roots of -i. Just solve the equation x^n + i = 0. To do this you use the PROOT (polynomial solver) function. Remember to insert zeroes for the missing powers of x. Say you want the 7th roots of -3, of which there are 7. You need to solve; x^7 + 0^6 + 0^5 + 0^4 + 0^3 + 0^2 + 0^1 + 3 = 0 The "0" character is a zero. PROOT expects the coefficients of the polynomial in a vector, so type in [ 1 0 0 0 0 0 0 3 ] and then execute PROOT. To find the 3 cube roots of -8, type [1 0 0 8] PROOT.

 Re: fractional powers of negative numbersMessage #16 Posted by Meenzer on 21 Nov 2007, 5:42 a.m.,in response to message #1 by Edward McNally Quote: In preparing for a calculus exam, the text showed a graph of the function x^4/3 - 4x^1/3. The calculator showed no data for x<0 although the text had a graph extending from -4

Go back to the main exhibit hall