The Museum of HP Calculators

HP Forum Archive 21

 Cubic root (-8) = 2 ?Message #1 Posted by Gilles Carpentier on 4 Aug 2013, 6:03 p.m. What do you think of this : All seems perfect and nothing seems violate math rules... but.... Edited: 4 Aug 2013, 6:22 p.m.

 Re: Cubic root (-8) = 2 ?Message #2 Posted by Csaba Tizedes (Hungary) on 4 Aug 2013, 6:35 p.m.,in response to message #1 by Gilles Carpentier At the first step the equality is not true, the "problem" is similar like SQRT(x^2) is not equal with x. When you are expanded the 1/3 to 2/6, you are make SQRT(x^2)==x mistake.

 Re: Cubic root (-8) = 2 ?Message #3 Posted by Harald on 5 Aug 2013, 4:42 a.m.,in response to message #2 by Csaba Tizedes (Hungary) The first step is perfectly fine. It is the third step that is the problem. Edit: Third expression, not third step. Edited: 5 Aug 2013, 4:53 a.m.

 Re: Cubic root (-8) = 2 ?Message #4 Posted by Reth on 5 Aug 2013, 7:54 a.m.,in response to message #3 by Harald Quote: The first step is perfectly fine. BS

 Re: Cubic root (-8) = 2 ?Message #5 Posted by Csaba Tizedes (Hungary) on 5 Aug 2013, 5:11 p.m.,in response to message #3 by Harald ...well, you're wrong, but my hungarian thinking gives me an other point of view when i'll try to solve similar problems... For example: ```(-1)^1 = -1, but (-1)^(2/2) = SQRT((-1)^2) = +1 ``` The mathematical symbol `(...)^c == (...)^(a/b)`, where `a/b = c` contains the mistake not the mathematical operation (which have not even been performed). You do not have to make error to know that a mistake. So, the first step is wrong. Csaba

 Re: Cubic root (-8) = 2 ?Message #6 Posted by fhub on 5 Aug 2013, 5:21 p.m.,in response to message #5 by Csaba Tizedes (Hungary) Quote: So, the first step is wrong. So you want to say that 1/3 = 2/6 is wrong?? LOL, what madhouse is this here? Franz

 Re: Cubic root (-8) = 2 ?Message #7 Posted by Csaba Tizedes (Hungary) on 6 Aug 2013, 3:14 a.m.,in response to message #6 by fhub :D Of course, `1/3 = 2/6` is true, BUT `(-8)^(1/3) = (-8)^(2/6)` is NOT true. ```(-8)^(1/3) == ((-8)^(1)) ^ (1/3) == (-8) ^ (1/3) = -2 (-8)^(2/6) == ((-8)^(2)) ^ (1/6) == (64) ^ (1/6) = +2 ``` My english is not very good, so one another example for clarification: ```A little BASIC program: 10 REM This program will be calculate logarithm of (-5) 20 A=-5 30 PRINT LOG(A); a.) The error as Gilles seems: "Everithing is fine, I do not understand why Line 30 is wrong because of LOG() ?!??!" b.) The error as an interpreter seems: "Line 30 is wrong because of LOG(neg)" c.) The error as Harald, Reth, fhub seems: "Line 30 is wrong because of LOG(neg)" d.) The error as a smart compiler seems: "Line 20 is wrong because of A is negative and this will cause error in Line 30 as LOG(neg)" e.) The error as I see: "Line 10 is wrong. This idea causes all trouble below." ;) ``` Csaba Edited: 6 Aug 2013, 3:20 a.m.

 Re: Cubic root (-8) = 2 ?Message #8 Posted by fhub on 6 Aug 2013, 4:01 a.m.,in response to message #7 by Csaba Tizedes (Hungary) Quote: Of course, `1/3 = 2/6` is true, BUT `(-8)^(1/3) = (-8)^(2/6)` is NOT true. That's pure nonsense! The error is NOT in replacing 1/3 by 2/6, but in what you do with this 2/6 later. Of course it's wrong to put this numerator 2 to the base (-8) first and then do the exponentiation ^(1/6), i.e. (-8)^(2/6) is NOT the same as ((-8)^2)^(1/6), simply because the rule a^(b*c)=(a^b)^c is NOT valid for ALL real numbers! So the 'error' in the starting post is indeed in the 3rd expression (or in the 2nd step) - besides that there's still another error in having forgotten a pair of important parentheses (because exponentiation is right-associative as already mentioned by an other member). Franz Edited: 6 Aug 2013, 4:05 a.m.

 Re: Cubic root (-8) = 2 ?Message #9 Posted by jep2276 on 12 Aug 2013, 11:50 a.m.,in response to message #8 by fhub Quote:...rule a^(b*c)=(a^b)^c is NOT valid for ALL real numbers Yes, when the base is negative. The rational exponent method cannot be used with negative bases because it does not have continuity. Quote:...but in what you do with this 2/6 later yes, see above! Then again, see above, if the base is negative then, the rational exponent method cannot be used so 1/3 should not be changed to 2/6! Edited: 12 Aug 2013, 11:55 a.m.

 Re: Cubic root (-8) = 2 ?Message #10 Posted by fhub on 12 Aug 2013, 12:34 p.m.,in response to message #9 by jep2276 Quote: if the base is negative then, the rational exponent method cannot be used Correct! Quote: so 1/3 should not be changed to 2/6! Well, it should not be changed (simply because it doesn't make any sense at all), but it definitely can be changed (if you want), because 1/3=2/6=5/15=.....=70/210=..... etc., no matter in which expression or formula this subexpression is contained. So as I've stated already a few times before: replacing 1/3 by 2/6 is NOT any error (it's just useless), the error is how the original calculation proceeded with this 2/6! And even if the base would have been positive (i.e. 8 instead of -8), an expression 8^(2/6) has to be calculated as 8^(1/3) but NOT as (8^2)^(1/6). Although it's not really wrong in this case, but the expression (2/6) has definitely priority over 8^... (ever heard of PEMDAS?), because 2/6 CAN be simplified to 1/3. Franz

 Re: Cubic root (-8) = 2 ?Message #11 Posted by jep2276 on 12 Aug 2013, 12:44 p.m.,in response to message #10 by fhub You mean we should use fractions that have been reduced! Ok, I can buy that. Still, the Rational Exponent Method does not apply to a negative base so the entire argument is axiomatic. And, Quote:simply because it doesn't make any sense at all

 Re: Cubic root (-8) = 2 ?Message #12 Posted by fhub on 12 Aug 2013, 12:53 p.m.,in response to message #11 by jep2276 Quote: Ok, I can buy that. I'm glad you finally got it - although it took quite some time! ;-) So peace again from now on ... :-) Franz Edited: 12 Aug 2013, 12:55 p.m.

 Re: Cubic root (-8) = 2 ?Message #13 Posted by jep2276 on 12 Aug 2013, 1:10 p.m.,in response to message #12 by fhub I have always got it. Disagreement does not translate to ignorance; however, acceptance of differences leads to greatness. Putting aside the argument of application, I still disagree with the entire concept of teaching math with a nursery rhyme, i.e. PEMDAS, because I feel that leads to only teaching the manipulation of numbers and not the understanding of math. Similarly, I think this thread is somewhat a product of that same type of problem. Peace from now on is fine by me.

 Re: Cubic root (-8) = 2 ?Message #14 Posted by Gilles Carpentier on 6 Aug 2013, 4:09 a.m.,in response to message #7 by Csaba Tizedes (Hungary) ... f/ There is no error because LOG(-5)=(LOG(5)+i*PI)/LOG(10) ;) Edited: 6 Aug 2013, 4:18 a.m.

 Re: Cubic root (-8) = 2 ?Message #15 Posted by CompSystems on 4 Aug 2013, 8:51 p.m.,in response to message #1 by Gilles Carpentier [HP-Prime CAS] approx(evalc((-8)^(1/3))) [Enter] return 1+73...i OK (principal complex root) but exact(1+73...i) [Enter] .... /=/ 2 (-1)^(1/3) =( approx((-8)^(1/3)) [Enter] return -2 real root Request for HP-Prime rename evalc to evalCplx Thanks more info http://www.wolframalpha.com/input/?i=%28-8%29%5E%281%2F3%29

 Re: Cubic root (-8) = 2 ?Message #16 Posted by Walter B on 5 Aug 2013, 5:47 a.m.,in response to message #1 by Gilles Carpentier Watch it: 641/6 = ±2 !

 Re: Cubic root (-8) = 2 ?Message #17 Posted by Gilles Carpentier on 5 Aug 2013, 8:20 a.m.,in response to message #16 by Walter B So we can say that sqrt(4)=±2

 Re: Cubic root (-8) = 2 ?Message #18 Posted by Walter B on 5 Aug 2013, 10:21 a.m.,in response to message #17 by Gilles Carpentier I hate opening that box once again, but there's a "convention" declaring SQRT(4) = +2 only. OTOH, 41/2 = ± 2 since it inverts (±2)2 = 4.

 Re: Cubic root (-8) = 2 ?Message #19 Posted by Eddie W. Shore on 6 Aug 2013, 3:31 p.m.,in response to message #16 by Walter B The sixth roots of 64 are: -2, 2, square_root(3)*i+1,-square_root(3)*i+1, square_root(3)*i-1, -square_root(3)*i-1

 Re: Cubic root (-8) = 2 ?Message #20 Posted by Thomas Klemm on 5 Aug 2013, 6:45 p.m.,in response to message #1 by Gilles Carpentier Exponentiation is right-associative, thus: $(-8)^{2^{\frac{1}{6}}}=(-8)^\sqrt[6]{2}$ Cheers Thomas

 Re: Cubic root (-8) = 2 ?Message #21 Posted by Gilles Carpentier on 7 Aug 2013, 4:49 p.m.,in response to message #20 by Thomas Klemm ;) and it's <> 64^(1/6)

 Re: Cubic root (-8) = 2 ?Message #22 Posted by Ángel Martin on 6 Aug 2013, 1:15 a.m.,in response to message #1 by Gilles Carpentier So much ado just to come to terms with the fact that square root is a multi-value function... that's all there is to it, nothing mysterious or bizarre. Sure enough not a matter of "conventions" or "dual rules" or "exceptions", but plain and simple math. Cheers, 'AM

 Re: Cubic root (-8) = 2 ?Message #23 Posted by Victor Koechli on 6 Aug 2013, 2:56 a.m.,in response to message #22 by Ángel Martin I still don't get it. The cubic root has three solutions, two complex and one real. What transformation in Gilles' process intoduces +2 as a fourth solution? Expanding 1/3 to 2/6? I guess it's just been too long since I learned that stuff...) Kind regards, Victor

 Re: Cubic root (-8) = 2 ?Message #24 Posted by Eddie W. Shore on 9 Aug 2013, 6:08 p.m.,in response to message #23 by Victor Koechli (-8)^(1/3) is taking finding the three roots of -8 (-8)^(2/6) is taking the the six roots of (-8)^2, or 64

 Re: Cubic root (-8) = 2 ?Message #25 Posted by fhub on 9 Aug 2013, 6:22 p.m.,in response to message #24 by Eddie W. Shore Quote: (-8)^(2/6) is taking the the six roots of (-8)^2, or 64 Mathematics: fail

 Re: Cubic root (-8) = 2 ?Message #26 Posted by Gilles Carpentier on 12 Aug 2013, 4:07 a.m.,in response to message #25 by fhub Both with 50G and Prime CAS : a^b^c is not (a^b)^c but a^(b^c) Exponentiation is a curious beast : right-associative as wrote Thomas.

 Re: Cubic root (-8) = 2 ?Message #27 Posted by fhub on 12 Aug 2013, 4:23 a.m.,in response to message #26 by Gilles Carpentier Quote: a^b^c is not (a^b)^c but a^(b^c) Yes, of course I know this, but what has this to do with your (wrong!) assumption that (-8)^(2/6) has to be (or should be) calculated as ((-8)^2)^(1/6) ??? Your previous statement "(-8)^(2/6) is taking the the six roots of (-8)^2, or 64" would require the following transformation: (-8)^(2/6) = (-8)^(2*(1/6)) != ((-8)^2)^(1/6) But the used exponentiation rule a^(b*c) = (a^b)^c is NOT true in this case (i.e. when the base a is negative)! Franz Edited: 12 Aug 2013, 4:25 a.m.

 Re: Cubic root (-8) = 2 ?Message #28 Posted by Gilles Carpentier on 12 Aug 2013, 5:59 a.m.,in response to message #27 by fhub Quote: Yes, of course I know this, but what has this to do with your (wrong!) assumption that (-8)^(2/6) has to be (or should be) calculated as ((-8)^2)^(1/6) ??? I think we said the same things ... The idea of my post was (like a puzzle) to show that ^ is right associative (as far I know it's the only operator like this ?) (-8)^(2/6)= (-8)^2^(1/6) is true but (-8)^(2/6)=((-8)^2)^(1/6) is false And of course (-8)^2^1/6 <> 64^(1/6). Here is the 'error' in the initial post edit : typo and quote error Edited: 12 Aug 2013, 6:02 a.m.

 Re: Cubic root (-8) = 2 ?Message #29 Posted by fhub on 12 Aug 2013, 6:58 a.m.,in response to message #28 by Gilles Carpentier Quote: (-8)^(2/6)= (-8)^2^(1/6) is true No, it's not! The RHS would mean to calculate the 6th root of 2 first, and that's something completely different! Franz

 Re: Cubic root (-8) = 2 ?Message #30 Posted by Gilles Carpentier on 12 Aug 2013, 7:16 a.m.,in response to message #29 by fhub Oh ! I see it now ! Thanks

 Re: Cubic root (-8) = 2 ?Message #31 Posted by Thomas Klemm on 12 Aug 2013, 6:02 p.m.,in response to message #28 by Gilles Carpentier Quote: to show that ^ is right associative Otherwise abc = abc, thus we wouldn't gain much by this convention. Quote: as far I know it's the only operator like this ? Any assignment operators are also typically right-associative.

 Re: Cubic root (-8) = 2 ?Message #32 Posted by Eddie W. Shore on 6 Aug 2013, 3:39 p.m.,in response to message #1 by Gilles Carpentier Also, with the NTHROOT functions, the calculator strives to give the principal root. If you want all the roots and have a calculator with CAS abilities, we will need to use a cSolve function, like this: CSolve(x^3-8=0,x)

 Re: Cubic root (-8) = 2 ?Message #33 Posted by Gilles Carpentier on 6 Aug 2013, 5:24 p.m.,in response to message #32 by Eddie W. Shore Here are all (?) the ways to do this with the 50G You can notice than even in Real Approx mode, the 50G returns a complex number (it's a legacy of the 48 series where there was no 'Complex mode') and because (-8)^0.33333333 is a complex number (no real root).It should result an error (no solution in |R) Also note the different results in |C~ mode between -8 3 XROOT and -8 1 3 / ^ it's logic, if you consider the second way is (-8)^0.3333333333... However, returning (-2) in '|C~' mode with XROOT is not logic (It must retunr the principal root); in '|R=' mode, XROOT and ^ should return (-2) and not a warning to switch in |C Edited: 6 Aug 2013, 7:08 p.m.

 Re: Cubic root (-8) = 2 ?Message #34 Posted by Kiyoshi Akima on 6 Aug 2013, 7:24 p.m.,in response to message #33 by Gilles Carpentier What about [ 1 0 0 8 ] PROOT to get the roots of the polynomial x^3 + 8 = 0 ?

 Re: Cubic root (-8) = 2 ?Message #35 Posted by Chris Osburn on 6 Aug 2013, 8:16 p.m.,in response to message #34 by Kiyoshi Akima Quote: What about [ 1 0 0 8 ] PROOT to get the roots of the polynomial x^3 + 8 = 0 ? [(1.000,-1.732) (1.000,1.732) (-2.000,0,000)]

 Re: Cubic root (-8) = 2 ?Message #36 Posted by jep2276 on 12 Aug 2013, 12:11 p.m.,in response to message #1 by Gilles Carpentier Just google Rational Exponent Method with Negative Base and it will be found that it does not apply (that way it is not me stating why). So 1/3 cannot be changed to 2/6 with the Rational Exponent Method.

 Re: Cubic root (-8) = 2 ?Message #37 Posted by George Litauszky on 12 Aug 2013, 3:37 p.m.,in response to message #36 by jep2276 Quote: Just google Rational Exponent Method with Negative Base and it will be found that it does not apply (that way it is not me stating why). So 1/3 cannot be changed to 2/6 with the Rational Exponent Method. I think: If the base is negative and the exponent is even, the result is positive, and if the exponent is odd, the result is negative. So, this expression is true only: ABS((-8)^(1/3)) = ABS((-8)^(2/6)) or ABS(((-8)^2)^(1/6)) Because SQRT(X^2)= +-X as Csaba Tizedes wrote. Edit: (-8)^(1/3) = (-8)^(2/6) but only ABS((-8)^(1/3)) = ABS(((-8)^2)^(1/6)) Edited: 12 Aug 2013, 3:55 p.m.

 Re: Cubic root (-8) = 2 ?Message #38 Posted by jep2276 on 12 Aug 2013, 10:26 p.m.,in response to message #37 by George Litauszky The rational exponent method cannot be used with negative bases because it does not have continuity Quote: think: If the base is negative and the exponent is even, the result is positive, and if the exponent is odd, the result is negative.so it is not continuous! f(q)=bq is continuous for b>0 but it is not continuous for b<0 and more importantly, when b<0 it is not continuous for the rational set of q for which it is defined.Anyway, I thought I was not going to explain this .... John Edited: 12 Aug 2013, 10:34 p.m.

Go back to the main exhibit hall