HP Forums
Integral dx/sqrt(1+x^3) - 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: Integral dx/sqrt(1+x^3) (/thread-2293.html)



Integral dx/sqrt(1+x^3) - Helge Gabert - 10-14-2014 05:14 PM

While the Prime cannot symbolically integrate the indefinite integral

1/sqrt(1+x^3) dx

which gets understandably complicated (involving an elliptic integral of the first kind),

in CAS, when trying to compute the definite integral between 0 and infinity, which exists and equals 2*Gamma(1/3)*Gamma(7/6)/sqrt(pi),

the Prime returns via approx(int(1/sqrt(1+x^3),x,0,inf)) [3184.6... 2.804 ...], where 2.804 is very close to the solution. The message is "adaptive method failure, will try with Romberg."

So, int (Gaussian quadrature?) seems to work, even though an error message (adaptive method failure) is issued?

Any insights are appreciated.

P.S. Using romberg instead of int returns a bracket which is totally off [6366... 3184...], but here the CAS message "unable to find numeric integral" makes sense.


RE: Integral dx/sqrt(1+x^3) - parisse - 10-14-2014 07:03 PM

Perhaps the message is misleading, the adaptative method (gaussian quadrature) fails but not much (error estimate is about 1e-9, greater than epsilon), while Romberg fails totally. I can probably issue another error message in the terminal with the error estimate.
(For my own usage, this is in intg.cc/tegral(const...)/
if (A==C || B==C)
return false; // can not subdivise anymore
)


RE: Integral dx/sqrt(1+x^3) - Helge Gabert - 10-14-2014 07:44 PM

Yes, an error estimate would definitely help the user! Since here we have two failures (one very small, one very big, but the error messages are basically the same).

Thank you!