The Museum of HP Calculators

HP Forum Archive 19

 50g integration oddityMessage #1 Posted by dbatiz on 12 May 2009, 4:30 a.m. The 50g has surprised me with some results when working with roots. I'm hoping some of the folks in the forum can offer an explanation for this behavior: Take the integral from -2 to 5 of the following: 1/(3rd root of (x^2+6x+9)) The 50g produces -3 However, recognizing that is a square trinomial, I rewrote it like this: (x+3)^(-2/3) Same integral produced 3. I checked both forms of the equation in my 35s and both returned a positive 3. Any insight would be greatly appreciated, Very respectfully, David

 Math Curiousity...an old fashioned approachMessage #2 Posted by Hal Bitton in Boise on 12 May 2009, 11:16 a.m.,in response to message #1 by dbatiz Hi David, When I did the integration symbolically of the equation 1/(3rd root of (x^2+6x+9)) I got the same result as you did (-3). When I tried to symbolically integrate (x+3)^(-2/3), however, the calculator did not simplify to a solution at all. When I evaluated the integrals of both forms of your equation numerically (by graphing and taking the area under the curve), I got the result (3) for both. I'm pretty sure the 35S integrates numerically (iteratively), which would explain it's solutions. This is above my pay grade as far as the calculus goes, but I,m guessing what's going on is that your integrand needs to be first transformed in order to find the antiderivatave (closed form), or there may not even be an antiderivative for it. There are math wizards on this forum who can and will elaborate on this I'm sure. At least I hope they will 8] Best regards, Hal

 Re: Math Curiousity...an old fashioned approachMessage #3 Posted by dbatiz on 12 May 2009, 3:36 p.m.,in response to message #2 by Hal Bitton in Boise Here is the kicker Hal, If you put the original equation in the stack, and use the intx (I think) from the calculus menu, it returns an equation that will be negative. I've had a couple of surprises when working with odd/even roots. The 50g always seems to know a little more about how to handle them than I do, but I think it missed the mark on this one. Thank you for the response, I'm looking forward to some of the wizards input also, Very respectfully, David

 Re: 50g integration oddityMessage #4 Posted by Martin Pinckney on 12 May 2009, 2:13 p.m.,in response to message #1 by dbatiz I did both forms of the expression on my 32sii, and it returned 3 in both cases. Not too surprising, since the 35s is a further evolution of the 32sii. Haven't figured out how to do integration on my 42s, yet.

 Re: 50g integration oddityMessage #5 Posted by dbatiz on 12 May 2009, 3:39 p.m.,in response to message #4 by Martin Pinckney I'm pretty sure it has something to do with the symbolic handling of the integral. The graph is complete (sometimes negative odd roots get dicey on the 50g), and always positive. The solution should be positive as well (so far as my understanding). Thank you for the response, Very respectfully, David

 Re: 50g integration oddityMessage #6 Posted by Dave Britten on 12 May 2009, 3:58 p.m.,in response to message #1 by dbatiz I get -3 in Exact mode, 3. in Approx. mode. Strange. -Dave

 Re: 50g integration oddityMessage #7 Posted by Marcus von Cube, Germany on 13 May 2009, 4:03 a.m.,in response to message #1 by dbatiz My TI-nspire CAS returns 3 as the numeric result and 3(x+3)^(1/3) for the indefinite integral, no matter which form of the term is input.

 Re: 50g integration oddityMessage #8 Posted by Bart (UK) on 13 May 2009, 6:23 a.m.,in response to message #1 by dbatiz By hand: Simplifying & integrating: integral((x+3)^(-2/3))dx; x=-2,5 substitute u=3+x, then du/dx=1 and dx=du integral(u^(-2/3))du = 3*u^(1/3) + c substituting back: = 3*(3rd root(x+3)); x=-2,5 = 3*(3rd root(8)) - 3*(3rd root(1)) =3 Using my old 48sx: positive 3 even older 28s: positive 3 (using (x^2+6*x+9)^(-1/3) as the eqn on both) I don't know where the 50g is going wrong. (I can't use my 50g as the display has too many missing lines :( ) Bart Edited: 13 May 2009, 6:42 a.m.

 Re: 50g integration oddityMessage #9 Posted by Arnaud Amiel on 13 May 2009, 8:39 a.m.,in response to message #8 by Bart (UK) When in numerical mode, the 50G will also return +3. The problem arises when it tries to solve it symbolically. Why? I don't know Arnaud

 Re: 50g integration oddityMessage #10 Posted by Bart (UK) on 13 May 2009, 9:15 a.m.,in response to message #9 by Arnaud Amiel Sorry, yes, the 28 & 48 solutions were numerically performed. Bart

 Re: 50g integration oddityMessage #11 Posted by Gerson W. Barbosa on 13 May 2009, 2:02 p.m.,in response to message #9 by Arnaud Amiel There is no problem here. Both solutions are correct... and since 6th root of x is a multivalued function we should expect for more four solutions, if I am not wrong: ``` / 5 | 1 | ------------------ dx = | --------------- | |³/ 2 / -2 |/ x + 6 x + 9 |5 ---------------- | |6 / 2 | = -3| / x + 6 x + 9 | |/ |-2 ------ ------ |6 / |6 / -3 | / 64 + 3 | / 1 = |/ |/ solution #1: -3*2 + 3 * 1 = -3 solution #2: -3*(-2) + 3 * (-1) = 3 ``` On the hp 50g, considering flags -3 and -105 are not set, that is, function -> symb and exact mode on: ```'integral(-2,5,1/XROOT(3,X^2+6*X+9,X)' ENTER EVAL -> -3 (first solution) <- |-> ->NUM -> 3. (second solution) ``` Regards, Gerson. Edited: 13 May 2009, 2:30 p.m.

 Re: 50g integration oddityMessage #12 Posted by dbatiz on 13 May 2009, 4:16 p.m.,in response to message #11 by Gerson W. Barbosa Gerson, What rule did you use to get: ``` |5 ---------------- | |6 / 2 | = -3| / x + 6 x + 9 | |/ |-2 ``` How did you avoid needing to use du/dx and such? Very respectfully, David

 Re: 50g integration oddityMessage #13 Posted by Gerson W. Barbosa on 14 May 2009, 7:43 a.m.,in response to message #12 by dbatiz Quote: What rule did you use... Actually, I used the hp 50g rule, as did Karl :-) ```'INV(XROOT(3,SQ(X)+6*X+9))' INTVX -(3*sqrt(cbrt(X^2+6X+9))) ``` Regards, Gerson.

 Re: 50g integration oddityMessage #14 Posted by Chuck on 13 May 2009, 11:57 p.m.,in response to message #11 by Gerson W. Barbosa Hmmm. In this case, there are also several complex results due to the original result involving cube roots (two complex results), or this result involving 6th roots (four complex results). All should have a magnitude of 3, I presume (total guess. It's been a few decades since complex analysis). However, I really don't think Reimann and his rectangles had any of this in mind when the definite integral was being born. I would say the -3 solution is "classically" incorrect, even though it may be analytically argued as possible. Interesting problem never-the-less. Cheers.

 Re: 50g integration oddityMessage #15 Posted by Karl Schneider on 13 May 2009, 3:23 p.m.,in response to message #1 by dbatiz "dbatiz" -- The oddity is rooted in the CAS for the predecessors of the HP-50g. On the 1990's HP-49G, INTVX obtains the following indefinite integral in symbolic form: ```'INV(XROOT(3,SQ(X)+6*X+9))' INTVX -(3*sqrt(cbrt(X^2+6X+9))) ``` The negative sign out front negates the correct answer. Interestingly, even though the HP-49G did not reduce the perfect square in the integrand, it made a difference: Change the +9 to +10 or +8, and the HP-49G fails to find a symbolic solution. However, the leading minus sign is still present in the result, which is a an evaluable command for numerical integration. There are indeed multiple mathematical answers for cube root and square root. However, if principal and/or real-valued roots are always to be taken, I submit that H-P's CAS answer is incorrect. The correct symbolic integral is ```3*cbrt(X+3) ``` Certainly, there is only one correct definite-integral answer, which all of the models with built-in integration will find using numerical methods. The moral: Know your calculus, so that you will always recognize balderdash in problems such as these. (Edited to add some content.) -- KS Edited: 14 May 2009, 1:47 a.m. after one or more responses were posted

 Re: 50g integration oddityMessage #16 Posted by dbatiz on 13 May 2009, 4:11 p.m.,in response to message #15 by Karl Schneider Gerson and Karl, Thank you for the insightful words! I ran across this problem while helping somebody with their calculus homework. We had trouble getting started with the problem, but once we re-wrote it using (x+3)^2 the solution jumped off the page. I still grapple with the multi values that some roots produce. I've learned more about that by reading this forum than in all my math classes combined. Again, thank you! Very respectfully, David *Edited to correct spelling of name Edited: 13 May 2009, 4:12 p.m.

Go back to the main exhibit hall