0
我試圖設置sympy來計算衍生物。當我用簡單的方程測試它時,我發現相同的答案(sympy計算與我自己的計算之間的平等是正確的)。然而,當我嘗試更復雜的,當它無法正常工作(我也檢查了wolfram alpha的答案)。sympy differential equality
這裏是我的代碼:
from __future__ import division
from sympy import simplify, cos, sin, expand
from sympy import *
x, y, z, t = symbols('x y z t')
k, m, n = symbols('k m n', integer=True)
f, g, h = symbols('f g h', cls=Function)
equation = (x**3*y-x*y**3)/(x**2+y**2)
equation2 = (x**4*y+4*x**2*y**3-y**5)/((x**2+y**2)**2)
pprint(equation)
print ""
pprint(equation2)
print diff(equation,x) == equation2