方程
a,b,c,x = symbols("a b c x")
my_eq = Eq(a*x**2+b*x+c,0)
solve(my_eq,x)
Out[12]: [(-b + sqrt(-4*a*c + b**2))/(2*a), -(b + sqrt(-4*a*c + b**2))/(2*a)]
微分
t=Derivative(sin(x),x) #t=sin(x)
print(t)
t.doit() #求导
Derivative(sin(x), x)
Out[13]: cos(x)
diff(sin(2*x),x)
Out[18]: 2*cos(2*x)
sin(2*x).diff(x)
Out[19]: 2*cos(2*x)
diff(sin(2*x),x,2) #2阶导
Out[20]: -4*sin(2*x)
diff(sin(2*x),x,3) #3阶导
Out[21]: -8*cos(2*x)
diff(sin(x*y), x,2,y,3)
Out[22]: x*(x**2*y**2*cos(x*y) + 6*x*y*sin(x*y) - 6*cos(x*y))
微分方程
积分