Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Thanks to the comment by @fredericc I found the answer! The solution is to use the algorithm='maxima' flag, e.g.

var('t')
h = function('h')(t)
integrate(exp(integrate(-2*h,t)),t, algorithm='maxima')

With the above, I can also manipulate the expression... differentiate or other:

var('t')
h = function('h')(t)
HH = function('HH')(t)
HH = exp(integrate(2*h,t))*(Cg + k*integrate(exp(integrate(-2*h,t)),t, algorithm='maxima'))
diff(HH,t)

The above result is compatible with the by-hand calculation and the result by Mathematica