我需要计算python的积分。
我已经进口了同情。
g(a,z) = integral_from_z_to_inf of ( t^(a-1) * e^(-1))
在python中:
x,a,z = symbols('x a z')
g = integrate(x**(a-1) * exp(-x), z, oo)
我有错误:
ValueError: Invalid limits given: (z, oo)
我打电话说:
b,c,mean,variance = S('b c mean variance'.split())
ff1 = b*g((1+c), lb / b) // lb is a constant, b and c are unknown var that I need to solve. and mean and variance are constants.
我有错误:
TypeError: 'Add' object is not callable
发布于 2014-03-21 05:53:34
我使用Python2.7,但您的问题似乎没有足够仔细地阅读文档。医生说:
var可以是:
您想要执行最后一个,所以您需要使用元组。
您要查找的命令是:
import sympy as sym
x, a, z = sym.symbols('x a z')
g = sym.integrate(x**(a-1) * sym.exp(-x), (x, z, sym.oo))
https://stackoverflow.com/questions/22560342
复制相似问题