## #2103 integrate(s^2 * exp(- (a+b) * s^2 ), s) returns bad result

closed
nobody
5
2010-11-22
2010-11-08
No

integrate(s^2 * exp(- (a+b) * s^2 ), s); returns bad result, i.e. for example for s=1 it's off by \frac{\sqrt{pi}}{4(a+b)^{3/2}} (for s=1 it's easy to verify that it's bad answer). It would be correct if Erfc=-Erf, but it isn't of course - maybe some transformations in progress fail? What's funny, integrate(s^2 * exp(- a * s^2 ), s); works and gives correct result. I tested it with Maxima 5.22.1.

## Discussion

• Dieter Kaiser - 2010-11-08

I do not see a real problem, because we can verify the following:

(%i1) (s^2 * exp(- (a+b) * s^2 ));
(%o1) s^2*%e^((-b-a)*s^2)

(%i2) integrate(%,s);
(%o2) -gamma_incomplete(3/2,(b+a)*s^2)*s/(2*(b+a)^(3/2)*abs(s))

(%i3) diff(%,s);
(%o3) s^2*%e^-((b+a)*s^2)

We get back the integrand. I have compared the result with a result from Wolfram alpha. It is possible to expand the integral in terms of the erf function. The integrals differ by a constant term sqrt(%pi)/(4*(a+b)^3/2). That is the result of this bug report too. But this is not an error. The result might be not the expected result, but it is not wrong.

Setting the status to pending and the resolution to "works for me".
Dieter Kaiser

• Dieter Kaiser - 2010-11-08
• status: open --> pending

• Andrzej Giniewicz - 2010-11-08

Indeed, I missed it I tested the diff on older version. Anyway, what is the reason for the difference in form of result in integrating (s^2 * exp(- (a+b) * s^2 )); and (s^2 * exp(- a * s^2 ));?

• SourceForge Robot - 2010-11-22
• status: pending --> closed

• SourceForge Robot - 2010-11-22

This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by