|||
cmd 命令下 pip install sympy
#求导
from sympy import *
y = Symbol('x')
diff(y**2,y)
#2*x
diff(f, *symbols, **kwargs)
Differentiate f with respect to symbols.
This is just a wrapper to unify .diff() and the Derivative class; its
interface is similar to that of integrate(). You can use the same
shortcuts for multiple variables as with Derivative. For example,
diff(f(x), x, x, x) and diff(f(x), x, 3) both return the third derivative
of f(x).
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-11-1 07:17
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社