Status: Valid
Owner: ----
Labels: Type-Defect Priority-Medium NeedsReview smichr

New issue 3270 by smi...@gmail.com: wrong value for integral
http://code.google.com/p/sympy/issues/detail?id=3270

Integral(x*sqrt(1+2*x), (x,0,1)).n()
0.759486989694218

In master the integration result is wrong:

integrate(x*sqrt(1+2*x),x).subs(x,1).n()
0.692820323027551
integrate(x*sqrt(1+2*x),x)
-4*x**3*(2*x + 1)**(5/2)/(-120*x**3 - 60*x**2) + 8*x**2*(2*x + 1)**(5/2)/(-120*x
**3 - 60*x**2) + (2*x + 1)**(5/2)/15
simplify(_)
sqrt(2*x + 1)*(6*x**2 + x - 1)/15

In 3268-9 it (serendipitously) agrees with the numerical result:

integrate(x*sqrt(1+2*x),x).subs(x,1).n()
0.759486989694218
Integral(x*sqrt(1+2*x), x).doit()
-2*sqrt(pi)*x**2*(2*x + 1)**(5/2)/(5*(-4*sqrt(pi)*x**2 - 2*sqrt(pi)*x)) - 4*sqrt (pi)*x**2/(15*(-4*sqrt(pi)*x**2 - 2*sqrt(pi)*x)) + 2*sqrt(pi)*x*(2*x + 1)**(5/2) /(15*(-4*sqrt(pi)*x**2 - 2*sqrt(pi)*x)) - 2*sqrt(pi)*x/(15*(-4*sqrt(pi)*x**2 - 2
*sqrt(pi)*x))
factor(_)
(6*x**2*sqrt(2*x + 1) + x*sqrt(2*x + 1) - sqrt(2*x + 1) + 1)/15


--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to sympy-issues@googlegroups.com.
To unsubscribe from this group, send email to 
sympy-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to