Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#2207 Incorrect integral of x^(.5)*%e^(-x-x^2)

open
nobody
5
2012-11-18
2011-06-15
Anonymous
No

This is based on Sage bug report at http://trac.sagemath.org/sage_trac/ticket/11493.

(%i16) integrate(x^(1/2)*%e^(-x-x^2),x,0,inf);
inf
/ 2
[ - x - x
(%o16) I sqrt(x) %e dx
]
/
0

(%i18) integrate(x^(.5)*%e^(-x-x^2),x,0,inf);
<snip lots of these>
rat: replaced 0.5 by 1/2 = 0.5
sqrt(%pi)
(%o18) ---------
2

The second one is quite wrong, as quad_qags shows:

(%i28) quad_qags(x^(1/2)*%e^(-x-x^2),x,0,1000);
(%o28) [.3201570903601473, 1.5628860428051894e-9, 609, 0]
(%i29) quad_qags(x^(1/2)*%e^(-x-x^2),x,0,10000);
***MESSAGE FROM ROUTINE DQAGS IN LIBRARY SLATEC.
***INFORMATIVE MESSAGE, PROG CONTINUES, TRACEBACK REQUESTED
* ABNORMAL RETURN
* ERROR NUMBER = 4
*
***END OF MESSAGE

(%o29) [.3201753870288189, .03110853789056672, 7707, 4]

Separately, what's up with that error message?

Discussion