I'm trying to take the following integral using sympy and it won't take it: >>> from sympy import * >>> integrate(x*exp(-(x-x0)**2), (x, 0, k)) If I 'help' it by adding and subtracting the same expression, it works fine: >>> sp.integrate((x-x0)*sp.exp(-(x-x0)**2)+x0*sp.exp(-(x-x0)**2), (x, 0, k)) Is there any way to automate this process? Wolfram Alpha takes it easily without any hints from user's side: Continue reading...