matlab积分

Matlab数学问题

╄→尐↘猪︶ㄣ 提交于 2019-11-28 16:07:41
1.符号微分(differential) (1)一元函数与多元函数的导数 diff(f,x,n):求解函数f的n阶导数 diff(diff(f,x,n),y,m):先求x的偏导,再求y的偏导,n和m代表阶数 subs(S,OLD,NEW):表示将符号表达式S中的符号变量OLD替换为新的值NEW (2)隐函数求导 如:e^(xy)+x+y=0 >> syms x y >> f =exp(x*y)+x+y; >> d = -diff(f,x,1)/diff(f,y,1) d = -(y*exp(x*y) + 1)/(x*exp(x*y) + 1) (3)参数方程求导 x = u(t),y = v(t) 如:x = sin(t)/(t+1)^3,y = cos(t)/(t+1)^3 >> syms t >> x = sin(t)/(t+1)^3,y = cos(t)/(t+1)^3; >> d1 = diff(x,t)/diff(y,t) d1 = -(cos(t)/(t + 1)^3 - (3*sin(t))/(t + 1)^4)/((3*cos(t))/(t + 1)^4 + sin(t)/(t + 1)^3) >> collect(d1) %合并同类项 ans = -(cos(t) - 3*sin(t) + t*cos(t))/(3*cos(t) + sin(t) + t*sin