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

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

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

(x^2)^(2/3)

=>

(x^2)^(1/3)

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

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. *

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

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