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).
转载本文请联系原作者获取授权,同时请注明本文来自夏江江科学网博客。
链接地址:http://blog.sciencenet.cn/blog-669638-1020954.html
上一篇:python 统计方法-分布检验
下一篇:python-拟合(一元线性)