HP Forums

Full Version: Simple Math Dilemma Revisited
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

In an earlier thread "Simple Math Dilemma" (April 13) Chuck wrote:

Quote:
One thing led to another, and it got me thinking about the value of (-1)^(2/6).

At first glance I "want" it to be +1, since we have "even" powers, (sort of).

On second glance it could be 1/2 + sqrt(3)/2 i, (the principal sixth root of a negative is complex; and then squared).

But, on third glance, basic algebra says to reduce all rational exponents to lowest terms before evaluating, which gives us -1. Hmmmm.

The TI-8X calculators give the third-glance result (-1) and produces a graph from -inf to +inf (the typical cube root function).

Mathematica gives the second-glance result (complex value), and a graph from 0 to +inf accordingly.

Back On-track, slightly: my HP-15 gives -1 (as expected). Haven't checked the others. my 28S gives the complex answer (as does my Casio) and graphs for only x>0.

I've yet to find one that gives +1 (bummer,even powers and all).

What do other calculators (hp or non-hp) give,and what "should" it be?

I now can only presume TI's are for the less mathematically mature student, and HP's are for the more mathematically advanced. (Ouch!)

But I wait your opinions.


I was surprised by the comment "The TI-8X calculators give the third-glance result (-1)" with no mention of the capability to yield the so-called "second glance" result. The actual situation is

1. The TI-80, TI-81 and TI-82 can only give the "third glance" result since those machines do not have a built-in complex number capability. A program which would yield the "second glance" result may be able to be written for one or more of those machines but I am not aware of one.

2. The TI-83, TI-84, TI-85, TI-86 and TI-89 give the "third glance" result if the -1 is entered as a real number. Those machines will give the "second glance " result if the user enters the -1 as a complex number; i.e., as (-1 + 0i) with the TI-83, TI-84 and TI-89, or as (-1,0) with the TI-85 and 86. All that is required is that the user understand how the machines operate..

"What do other calculators (hp or non hp) give ...?" With my HP-41's the keyboard sequence

1 CHS ENTER 2 ENTER 6 / Shift y^x yields DATA ERROR

where Appendix E (Messages and Errors) says that "The HP-41 attempted to perform a meaningless operation." where y<0 and x is non-integer. If the Math Pac module is installed then the sequence

0 ENTER 1 CHS ENTER 2 ENTER 6 / XEQ ALPHA Z Shift ENTER N ALPHA

yields the "second glance" result even though the instructions say that this method will "Raise z to an integer power." I have tried other non-integer powers and get resultst which is the same as that received from my HP-28S, TI-83, etc. The sequence includes sixteen keystrokes.

On my TI-59 the sequence ( 1 +/- ) y^x ( 2 / 6 ) = yields a flashing one error indication. The fourth error condition on page B-1 of the manual is "Raising a negative number to any power (or root). The power (Ior root) of the absolute value of the number is flashed. With the Master Library module installed the sequence

2nd Pgm 0 4 2 / 6 = A 0 A 1 +/-2nd A 0 2nd A D

yields the "second glance" result after niineteen keystrokes versus the sixteen keystrokes with the HP-41C with the Math Pac installed. My friend Richard Nelson would tell me that is one more demonstration of the keystroke efficiency of RPN.

The TI-59 with the Master Library module will permit the use of complex exponents. My HP-41C with the Math Pac module does not seem to permit the use of complex exponents -- but, maybe I just haven't figured out how to do that. I would expect that some other HP-41 module or stand-alone program will permit the use of complex exponents. I just don't have such a module or program in my collection.

Finally, I note that all the machines I tested can be induced to yield positive one for the problem if the user first squares the -1 value and then raises the intermediate result to the 1/6 power. Of course, that isn't consisten with the problem as written if one interprets parentheses in the standard manner. Positive one can be obtained if a different problem were proposed; i.e., (( -1)^2))(1/6) . Isn't it wonderful what a few added parentheses can achieve?

Quote:
Isn't it wonderful what a few added parentheses can achieve?

Yes indeed. But don't tell that to Sam "we don't need no stinkin parentheses" Levy.

[;-)

Quote:
"What do other calculators (hp or non hp) give ...?" With my HP-41's the keyboard sequence

1 CHS ENTER 2 ENTER 6 / Shift y^x yields DATA ERROR

where Appendix E (Messages and Errors) says that "The HP-41 attempted to perform a meaningless operation." where y<0 and x is non-integer.


Right. The point is that the calculator cannot check if the reciprocal of the exponent is an odd integer (which is required for a valid real result). In fact, 1/0,3333333333 actually is 3,000000000300 when rounded to the internal 13 digits. ;-)
Quote:
If the Math Pac module is installed then the sequence

0 ENTER 1 CHS ENTER 2 ENTER 6 / XEQ ALPHA Z Shift ENTER N ALPHA

(...)

The sequence includes sixteen keystrokes.

(...)

My friend Richard Nelson would tell me that is one more demonstration of the keystroke efficiency of RPN.


Well, you forgot to mention that in your example seven of these "sixteen keystrokes" are used to call the Z^N function. Of course any HP-41 user handling complex numbers will assign the complex functions to the keys of their real counterpart. AFAIR this is even suggested in the math pac manual. So it's actually 10 keystrokes, maybe 11 if the function is shifted. So yes, 10 keystrokes instead of 19 really is a nice example of the keystroke efficiency of RPN. ;-)
Quote:
The TI-59 with the Master Library module will permit the use of complex exponents. My HP-41C with the Math Pac module does not seem to permit the use of complex exponents -- but, maybe I just haven't figured out how to do that. I would expect that some other HP-41 module or stand-alone program will permit the use of complex exponents.

Sure. I admit I always wondered why the software modules included so much examples of poor programming.

Dieter

Hi Palmer,

I went the rounds with this very phenomenon a couple of years back when my classmates TI 89's returned -1 for (-1)^(2/6), and my 50g returned 1/2 + sqrt(3)/2 i,
or 1 at angle 60deg, or 1 at angle pi/3, even with complex deselected on the CAS screen. Of course, both machine naturally reduced the exponent to 1/3. The conclusion I came to was that the HP's algorithm was just written to return the principle root of any complex number. To remedy this, I wrote a short program for my
50G which would return all N of the Nth roots of ANY number, complex or real. (Of course, all numbers are complex, some just have an imaginary component of zero :)
I could then select which ever root struck my fancy.

It is interesting how the order in which you apply the fractional exponent affects the outcome. Square first, then take the sixth root, and you just get 1. Reverse that order, and you get the aforementioned principle cube root of 1.


I'm curious, however, as to how you got your 15C to return -1. For (-1)^(2/6) My 15C returns
(.5, .87), or 1 at angle 60 if I convert to polar form.
Although not at hand at the moment, I'm 99% sure my 42s returns likewise.

Best regards, Hal

Quote:
I'm curious, however, as to how you got your 15C to return -1. For (-1)^(2/6) My 15C returns (.5, .87), or 1 at angle 60 if I convert to polar form. Although not at hand at the moment, I'm 99% sure my 42s returns likewise.

My 42S does exactly what you suspected - and so does the 41Z module. Not surprisingly since it's the principal root.

Quote:
I'm curious, however, as to how you got your 15C to return -1. For (-1)^(2/6) My 15C returns
(.5, .87), or 1 at angle 60 if I convert to polar form.

I don't have a 15C. It was Chuck who stated in the original thread that his 15C returned -1. We'll have to wait for him to explain. I do have an 11C and a 12C. Those devices don't offer complex mathematics and return the message "Error 0" which indicates a mathematics error. y^x with y<0 and x a noninteger is one of the options that gives "Error 0".

Here is a short article written in the New York State math journal in 1992. A nice take on this phenomena (dilemma??)

Article on (-1)^(6/4)

CHUCK

Edited: 25 Apr 2011, 5:22 p.m.

Quote:
Here is a short article written in the New York State math journal in 1992. A nice take on this phenomena (dilemma??)

Interesting read...thanks Chuck.

Best regards, Hal