HP Forums
An integral - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: An integral (/thread-2091.html)



An integral - lrdheat - 09-06-2014 04:24 PM

How do I get the integral from 0 to 6 for (3 root x)^2 * 3 root (6-x) to evaluate in CAS? It comes back with an integral. Approx returns the correct numerical result. My old TI NSpire CAS returns the correct (8*pi*sqrt 3)/3.


RE: An integral - jebem - 09-06-2014 04:58 PM

(09-06-2014 04:24 PM)lrdheat Wrote:  How do I get the integral from 0 to 6 for (3 root x)^2 * 3 root (6-x) to evaluate in CAS? It comes back with an integral. Approx returns the correct numerical result. My old TI NSpire CAS returns the correct (8*pi*sqrt 3)/3.

I tried on CAS mode and it returns (1/5)*sqrt(6)*1296 and in approx mode it gives 634.907741329

In wolframalpha returns (1296*sqrt(6))/5 and in approx mode the result is 634.91
www.wolframalpha.com

I also tried in Home mode and the result is the same (634.907741329).
The only difference is that in Home mode I used uppercase "X", while in CAS i used lowecase for "x".

So it seems it is alright to me.

EDIT:
I see what do you mean now:
integral from 0 to 6 for (cubic root x)^2 * cubic root (6-x)

Trying this 2nd equation in Home mode the approx answer is: 14.5103949139

And in CAS mode, I get a message: "Temporary replacing surd/NTHROOT by fractional powers"
Pressing ENTER i get another integral as you mentioned in the OP, instead of the expected (8*pi)/sqrt(3)
Trying the approx the answer is 14.5103949139


RE: An integral - lrdheat - 09-06-2014 06:31 PM

I wonder if there is a way in CAS to get the (8*pi*sqrt 3)/3 answer?


RE: An integral - jebem - 09-06-2014 07:49 PM

(09-06-2014 06:31 PM)lrdheat Wrote:  I wonder if there is a way in CAS to get the (8*pi*sqrt 3)/3 answer?

Let's see if Bernard Parisse can give an answer - he is the "father" of XCAS that is also used in the HP-PRIME in a more restricted form, I think.

By the way, XCAS is a nice tool to have installed in a PC as well, specially when we own a HP-PRIME.

I have tried your expression in XCAS and the result is basically the same.


RE: An integral - patrice - 09-06-2014 07:57 PM

(09-06-2014 06:31 PM)lrdheat Wrote:  I wonder if there is a way in CAS to get the (8*pi*sqrt 3)/3 answer?
Since sqrt(3) / 3 is the same as 1 / sqrt(3)
jebem Wrote:(8*pi)/sqrt(3)
is your answer, only presented differently.


RE: An integral - lrdheat - 09-06-2014 07:59 PM

Yes, obviously! But is there a way to produce this answer for the integral in CAS?


RE: An integral - jebem - 09-06-2014 08:05 PM

(09-06-2014 07:57 PM)patrice Wrote:  
(09-06-2014 06:31 PM)lrdheat Wrote:  I wonder if there is a way in CAS to get the (8*pi*sqrt 3)/3 answer?
Since sqrt(3) / 3 is the same as 1 / sqrt(3)
jebem Wrote:(8*pi)/sqrt(3)
is your answer, only presented differently.

Hi Patrice,
I believe you misread me in Post#2.
What the OP is asking is why is the Prime not giving an exact result (like 8*pi*sqrt 3)/3 or (8*pi)/sqrt(3))?
What the Prime is doing is to answer with another integral. I also tested with XCAS (see post #4) and the behavior is similar to the Prime.
The only choice found so far is to use the approx to get a real number.


RE: An integral - patrice - 09-06-2014 09:10 PM

Hi Jose,
(09-06-2014 08:05 PM)jebem Wrote:  
(09-06-2014 07:57 PM)patrice Wrote:  Since sqrt(3) / 3 is the same as 1 / sqrt(3)
is your answer, only presented differently.

Hi Patrice,
I believe you misread me in Post#2.
What the OP is asking is why is the Prime not giving an exact result (like 8*pi*sqrt 3)/3 or (8*pi)/sqrt(3))?
What the Prime is doing is to answer with another integral. I also tested with XCAS (see post #4) and the behavior is similar to the Prime.
The only choice found so far is to use the approx to get a real number.
No, I think I read carefully your answer.

I was answering to lrdheat which want the answer spelled the exact way of the Nspire, even if the Nspire is the one guilty of not fully simplifying the answer.
Your answer match the one he is awaiting for, simply Prime simplified it further.


RE: An integral - lrdheat - 09-06-2014 10:00 PM

Hi Patrice,

Both Jebem and I had the same experience on the Prime in CAS mode in that the integral returns an integral. It comes up with the correct numerical in approximate mode. We are both asking if the Prime can return a correct symbolic answer in CAS.


RE: An integral - parisse - 09-07-2014 07:10 AM

This is a Beta integral, 36*Beta(5/3,4/3), as can be easily seen by the change of variable x=6t. Then 36*Beta(5/3,4/3)=18*Gamma(4/3)*Gamma(5/3)=18*1/3*Gamma(1/3)*2/3*Gamma(2/3)=4*Gamma(1/3)*Gamma(2/3) and
Gamma(1/3)*Gamma(2/3)=pi/sin(pi/3)=2*pi/sqrt(3) (Euler reflexion formula)


RE: An integral - Thomas Klemm - 09-07-2014 08:27 AM

This is left as an exercise for the user.


RE: An integral - lrdheat - 09-07-2014 07:54 PM

Hi Parisse,

One doesn't have to resort to Betas and Gammas to solve the integral (thankfully as I didn't study those integrals in my calculus classes 40 years ago...). I'm still curious... can XCAS as employed by my Prime (which I think is excellent, and look forward to future firmwares) deliver a correct symbolic answer for the integral?


RE: An integral - parisse - 09-08-2014 06:16 AM

How do you solve it without Beta/Gamma?
I'm going to update Xcas, it will solve this integral.


RE: An integral - lrdheat - 09-08-2014 08:10 PM

My mistake...The example came from one of my calculus books illustrating the shape of a graph of f(x) in connection with f'(x). The integral of the function was NOT explored...I was experimenting with the integral of that function, comparing numerical results on my WP 34S, CASIO fx-9860GII, HP Prime, and the TI NSpire. I was surprised to see that the NSpire came up with a symbolic result that was equivalent to the numerical results on the other platforms. The Beta integrals (beyond my math experience) that you referred to must be the way to get an exact solution!

I'm simply amazed at what folks like you can build into a CAS. During the slide rule age, when the HP 35 came out, it was hard to believe that such a capable machine was possible. The instruction book stated "we thought you'd like to have something only fictional heroes like James Bond, Walter Mitty, or Dick Tracy are supposed to own."

Similar wonder and excitement was expressed in the instruction book for my Versalog slide rule:
"Early in 1950, a group of prominent professors and practicing engineers were approached with the problem of designing a practical slide rule for TODAY'S problems..."....."It provides both the practicing engineer and the student with a far more efficient and helpful, up-to-date "tool" to match the high tempo of present day engineering development."