Menu

#2369 integration with floats in exponents

open
nobody
None
5
2012-11-18
2012-03-09
No

Something is wrong:

(%i11) integrate(x^(0.5) * (1+x^2)^(0.5),x,0,1);
(%o11) (%e^(3/4)*sqrt(%pi)*%i*erf(%i/2))/2-(%e^(3/4)*sqrt(%pi)*%i*erf((3*%i)/2)-2^(3/2))/2

(%i12) float(%);
(%o12) 8.862088383369269

Numerical check:

(%i15) quad_qag (x^(0.5) * (1+x^2)^(0.5), x, 0, 1, 3, 'epsrel=5d-8);
(%o15) [0.79248561602668,2.6069049931541242*10^-8,651,0]

Nounform without floats:

(%i16) integrate(x^(1/2) * (1+x^2)^(1/2),x,0,1);
(%o16) integrate(sqrt(x)*sqrt(x^2+1),x,0,1)

Discussion


Log in to post a comment.