代码:symsxf=x*cos(x);diff(f,'x')求一次导有ans=cos(x)-x*sin(x)求三阶导代码:symsxf=x*cos(x);diff(f,'x',3)ans=-3*cos(x)+x*sin(x)满意请采纳哦~~