我想用Python定义这个函数:
F(s) = integration(f(x, a), 0, s)
其中f(x, a)
可以是x的任何函数。这里a
是一个常数。你知道吗
例如:f(x,2)=exp(2*x/(2+x))
并在Python中计算其集成度:
value = integration(F(rho)-F(s),0,rho) # here rho is a given constant.
到目前为止,我已经手工计算了“f”(不是上面的函数)的积分,然后使用fromscipy.integrate
import quad来计算最后的积分。但是,手工计算每个函数的积分是不可能的。例如,上述函数“f”。你知道吗
相关问题 更多 >
编程相关推荐