Hi folks,

I'm trying to integrate a function but I can't understand why sympy is
producing the wrong output.

The equation is,

var('C E kT xmin')
Assume(kT > 0)
Assume(xmin >=0)
integrate(C * x**2 * exp(-x/kT), (x, xmin, oo))

which gives,
-oo - C*(-2*kT**3*exp(-xmin/kT) - kT*xmin**2*exp(-xmin/kT) -
2*xmin*kT**2*exp(-xmin/kT))

This is correct apart from negative infinity the appears at the
beginning. Am I doing something wrong?

When I tried this with Maxima is asked what the sign of kT is (hence
the use of Assume above), but it then goes on to give the correct
answer. Help very much appreciated.

Best regards,

Dan

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

Reply via email to