简体   繁体   English

微分方程计算

[英]differential equations calculating

I need to calculate some phrase as below. 我需要计算如下的一些短语。

d/dx(sin^2(cos(x)) = 2sin(cos(x))*-sin(x)*cos(cos(x))

it is differential equations calculating. 它是微分方程计算。 each phrase can place in d(phrase)/dx . 每个短语都可以放在d(phrase)/dx

is this ability in python and if is not, how can I calculate this kind of phrase? 这是python中的功能吗?如果不是,我该如何计算这种短语?

Thanks. 谢谢。

参见sympy ,一个符号数学库。

As the others have said. 正如其他人所说。 Take a look at SymPy. 看一下SymPy。 Here is a code snippet to demonstrate the relevant functions. 这是演示相关功能的代码段。

In [1]: from sympy import *

In [2]: x = Symbol('x')

In [3]: (sin(cos(x))**2).diff(x)
Out[3]: -2⋅sin(x)⋅sin(cos(x))⋅cos(cos(x))

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM