如何在python dC/dt = r + kI - dC中实现这种方程式,其中左侧是常量而右侧是变量?使用Sympy在Python中的差异化
我相对较新的python,因此不能做太多。 from sympy.solvers import ode
r=float(input("enter r:"))
k=float(input("enter k:"))
I=float(input("enter I:"))
d=float(input("enter d:"))
C=float(input("enter C:"))
dC/dt=x
x=r + kI-dC
print(x)
它只是做等同于x的值,而不是任何不同,想帮助得到这个工作。
如果可能我想获得指定使用sympy, 的答案,但所有的答案都是真正的赞赏。
你看到[这](http://docs.sympy.org/dev/modules/mpmath/微积分/ differentiation.html) – 2014-12-03 13:36:51
嗯,我有,谢谢你,但我真的没有得到它,这就是为什么我把这个方程在问题中,所以如果我能够得到答案,我可以检查它,知道它是如何完成的。 – 2014-12-03 14:45:50
@KennethIwuchukwu看来你可以从Sympy教程中获利(http://docs.sympy.org/latest/tutorial/index.html)。稍后,您应该特别研究[本节](http://docs.sympy.org/latest/tutorial/solvers.html#solving-differential-equations)。 – gboffi 2014-12-04 16:11:20