【发布时间】:2020-05-20 04:51:06
【问题描述】:
import math
import scipy.integrate
import sympy
m1 = sympy.Symbol('m1')
m2 = sympy.Symbol('m2')
s = sympy.Symbol('s')
T = sympy.Symbol('T')
k = sympy.Symbol('k')
integral = sympy.integrate(((k**2)/8 * math.pi)*(1/(math.sqrt(k**2 + m1**2) * math.sqrt(k**2 + m2**2)))*(1/(math.sqrt(s)-math.sqrt(k**2 + m1**2)-math.sqrt(k**2 + m2**2)))
* ((1/(math.exp((math.sqrt(k**2 + m1**2))/T)-1))+(1/(math.exp((math.sqrt(k**2 + m2**2))/T)-1))), (k, 10**-15, math.inf))
print(integral)
【问题讨论】:
-
使用 sympy.sqrt 和 sympy.pi 而不是 math.sqrt 和 math.pi。
标签: python typeerror sympy integrate