HP 50G Cube Root of Negative Hal Bitton in Boise Senior Member Posts: 291 Threads: 43 Joined: Jun 2007 10-14-2008, 08:56 PM Hi all, Is there any way to make the 50G return the real cube root of a negative number? (As opposed to one of the conjugates). I.E., Key in -8 ENTER 3 1/X Y^X and 2 at angle 60 is returned. Is there any way to force it to return -2? I've deselected allow complex in the CAS settings to no avail. Thanks, Hal Karl Schneider Posting Freak Posts: 1,792 Threads: 62 Joined: Jan 2005 10-15-2008, 12:51 AM Hal -- Jeremy Smith showed me the trick for this same problem on his HP-50g at HHC 2008 last month: To obtain the real-valued cube root of -8, turn on "Approx" mode under CAS ("Complex" mode can be on or off.) How 'bout that convoluted answer the HP-49G and HP-50g give in exact mode? To wit: (-8)^(1/3) = 2*exp((pi/3)*exp(i*pi/2)) Of course, this is simply (-8)^(1/3) = 1 + i*sqrt(3) -- KS Hal Bitton in Boise Senior Member Posts: 291 Threads: 43 Joined: Jun 2007 10-15-2008, 02:07 AM Hi Karl, thanks for your response, Indeed, approx mode gives the real valued cube root when using the xth root of y key. If, however, I raise -8 to the 1/3 power using the y^x key, the complex root in quadrant 1 is returned (2 at angle 60). I suppose this is a non issue, as I don't mind using the xth root key. But this gets interesting now... Graph the function cube root x, using the xth root key, and it graphs the real root for x values less than zero, as one would expect. If, however, I try to graph cube root x squared, (ie, x^(2/3) which should reflect the negative side of the graph about the x axis, I actually get a blank graph to the left of the y axis. This would lead me to beleive that the calculator is now using one of the complex cube roots, and squaring it, which of course will not graph on a real numbered y-axis. I did finally get this function to graph by forcing it to square the x value first, then take the cube root by composing the function algebraically and using parenthesis thusly; (x^2)^(2/3). Again, no big deal, but it seems inconsistant to me that the real cube root would be used for cube root x, but not for cube root x squared when graphing. Best regards, Hal V-PN Posting Freak Posts: 785 Threads: 13 Joined: Jan 2005 10-15-2008, 03:16 AM (x^2)^(2/3) => (x^2)^(1/3) Hal Bitton in Boise Senior Member Posts: 291 Threads: 43 Joined: Jun 2007 10-15-2008, 10:57 AM Quote: (x^2)^(2/3) => (x^2)^(1/3) You're right, thank you...I meant to type in (x^2)^(1/3) sorry about that hal C.Ret Senior Member Posts: 260 Threads: 0 Joined: Oct 2008 10-15-2008, 05:46 PM Quote:Is there any way to make the 50G return the real cube root of a negative number? Hi, I have no HP-50G, only a HP-28S. As your 50g, my 28S returns one of the two conjugate solution when keying 8 CHS 3 INV ^ ---> (1.0000,1.7324) A first way to get only the real root is to use the SOLVER menu or the ROOT function: `'y^3=-8' 'y' 0 ROOT ---> 2.000` A short program may spare same keystrokes: ```\<< 'y' DUP 3 ^ ROT = SWAP 0 ROOT \>> 'RCRt' STO Stack: 1: -8 [RCRt] ----> 1: -2.0000 1: -27 [RCRt] ----> 1: -3.0000 1: 125 [RCRt] ----> 1: 5.0000 1: -125 [RCRt] ----> 1: -5.0000``` This little code determine the real cube root of any positive, null or negative real number at stack level 1:. Any complex number may lead to an "Bad Guess(es)" error stop, as ROOT may only handle real number. A second easy way to get the real cubic root may be using absolute value of the negative number to avoid switching to complex solutions domain : 8^(1/3) returns 2.000 which may be sign changed in -2.0000 ```\<< DUP SIGN SWAP ABS 3 INV ^ * \>> 'CRt' STO Stacks: 1: -8 [CRt] ----> 1: -2.0000 1: -27 [CRt] ----> 1: -3.0000 1: 125 [CRt] ----> 1: 5.0000 1: -125 [CRt] ----> 1: -5.0000``` This second version is faster than the first one. Giving a complex number as entry returns a complex number Edited: 15 Oct 2008, 6:02 p.m. Antonio Maschio (Italy) Senior Member Posts: 416 Threads: 78 Joined: Mar 2006 10-16-2008, 05:51 AM Something curious. Settings: DEC C= 'X' (but DEC R~ is the same) If I type ```8 +/- ENTER 3 xRooty (RS Root) ``` I get 2*(1+i*sqr(3))/2[note: in Real Mode I'm asked to turn to complex mode) If I type ```8 . +/- ENTER 3 xRooty ``` I get -2[Note: I only added a decimal point with no decimals after the number]. This works in all the viewing options (STD, FIX at least). My 2c. -- Antonio Hal Bitton in Boise Senior Member Posts: 291 Threads: 43 Joined: Jun 2007 10-16-2008, 03:53 PM Thanks Antonio and C.Ret for your inputs. Putting a decimal point after the -8. forces a solution in approx mode which returns the real valued cube root (only if keyed in as -8.00 3 xrooty). If keyed in as 8.00 3 1/x y^x, it returns the cube root in quadrant 1 (2 at angle 60 degrees). This all started when I was grappling with the issue of plotting the function x^(2/3), and trying to figure out why there was no plot for negative x values. I have since arrived at the conclusion that the only way to get the calculator to plot an output for negative domain values of this function is to force (and I mean force!) the machine to execute the square first, then take the cube root by keying the function in as ((8^2)^1/3), which must be done algebraically (horrors!). Only then will this function plot for x values less than zero. It seems the TI89 returns the real valued cube root by default, so such draconian measures are not nessessary when plotting that function on that machine (it can simply be keyed in as -8^(2/3). My only consolation would be that if we wanted a complex cube root returned for a particular function, the roles would be reversed (maybe). Thanks and best regards, Hal V-PN Posting Freak Posts: 785 Threads: 13 Joined: Jan 2005 10-16-2008, 06:52 PM [1 0 0 3] PROOT « Next Oldest | Next Newest »

 Possibly Related Threads... Thread Author Replies Views Last Post [HP Prime] Using n-root symbol and exponent problem uklo 7 1,540 11-11-2013, 01:39 AM Last Post: Alberto Candel Cubic root (-8) = 2 ? Gilles Carpentier 37 5,066 08-12-2013, 10:26 PM Last Post: jep2276 WP-34s negative shifts Andrew Nikitin 5 928 06-12-2013, 04:10 AM Last Post: Marcus von Cube, Germany Square Root Simplifier for HP39gII Mic 4 1,112 03-11-2013, 08:25 AM Last Post: Eddie W. Shore HP-71B - thanks to Marcus von Cube for MATH ROM article Michael Lopez 2 753 03-03-2013, 07:19 AM Last Post: Paul Berger (Canada) Cube root on standard calculator Thomas Klemm 22 3,383 11-09-2012, 06:11 AM Last Post: Pierre ROOT bug? HP 48S/48G Eddie W. Shore 8 2,579 07-13-2012, 07:05 PM Last Post: Eddie W. Shore x root y on hp42s David Griffith 14 2,119 04-08-2012, 12:43 PM Last Post: Walter B 35s prompt for multi-character variables in program like "low footprint" root finder Chris C 8 1,593 02-14-2012, 06:52 PM Last Post: Chris C HP-35 powers with negative numbers Dan Lewis 26 3,152 01-26-2012, 02:41 AM Last Post: Nick_S

Forum Jump: