I have been having some trouble getting the sympy module to evaluate a definite integral. Equation When I try to run the following code the program fails to finish. The problem seems to come from the fact that the integral bounds includes a variable that is in the equation. It keeps running and running and is never able to resolve the equation. I was able to get the equation to resolve by using different bounds but that's not what I'm going for. If you have any advice or tips I'd be glad to hear it. Thanks for your help.
import sympy
import numpy as np
from scipy.integrate import quad
import matplotlib.pyplot as plt
sympy.init_printing()
Q, eta, phi, kappa, lamb, beta, T0, T1, deltaT, T = sympy.symbols('Q eta phi kappa lamb beta T0 T1 deltaT T', real=True)
integrand = sympy.integrate(eta**(lamb*beta-1)*sympy.exp(-eta**2), (eta,0,eta))
T = T0 + deltaT*integrand
fT = sympy.lambdify((T0,T1,eta,lamb,beta), T, 'numpy')