## #2499 incorrect result for integral with float in integrand

open
nobody
5
2012-12-04
2012-11-16
Anonymous
No

(%o9) [.2536334149282484,6.748751768357728e-11,31,0]

Right, because this is a positive function. But:

(%i10) integrate((2/3)*x^(5/2)*(x+1)^.5,x,0,1);

rat: replaced 0.5 by 1/2 = 0.5

rat: replaced 0.5 by 1/2 = 0.5

rat: replaced 0.5 by 1/2 = 0.5

rat: replaced -2.0 by -2/1 = -2.0

rat: replaced -5.0 by -5/1 = -5.0

rat: replaced -5.0 by -5/1 = -5.0
(%o10) -2^(7/2)/9

Whatever this is, it isn't positive. float() gives -1.257078722109418

The following seems to be okay, though the answer is extremely annoying.

(%i11) integrate((2/3)*x^(5/2)*(x+1)^(1/2),x,0,1);

(%o11) 2*(-(15*log(sqrt(2)+1)-15*log(1-sqrt(2))-61*2^(3/2))/384-5*log(-1)/128)/3
(%i14) expand(float(expand(integrate((2/3)*x^(5/2)*(x+1)^(1/2),x,0,1))));

(%o14) 0.2536334149287

## Discussion

• Robert Dodier
2012-11-30

• summary: Incorrect integral --> incorrect result for integral with float in integrand
• milestone: --> To_be_fixed