syms t
y=sin(t)/(t+1).^3;
x=cos(t)/(t+1).^3;
s=diff(y,t,3)/diff(x,t,3);
s=simplify(s)
returns
s =
-(cos(t)/(t + 1)^3 - (36*cos(t))/(t + 1)^5 - (9*sin(t))/(t + 1)^4 + (60*sin(t))/(t + 1)^6)/((9*cos(t))/(t + 1)^4 - (60*cos(t))/(t + 1)^6 + sin(t)/(t + 1)^3 - (36*sin(t))/(t + 1)^5)
2、求解函数边界的定积分问题,如果直接求解有问题,请尝试先求不定积分,然后替换成边界的方法。
syms x
I=int((-2*x^2+1)/(2*x^3-3*x+1)^2);
L=subs(I,'exp(1)^(-2*t)')-subs(I,'cos(t)');
simplify(L)
returns
1/(6*exp(-6*t) - 9*exp(-2*t) + 3) - 1/(6*cos(t)^3 - 9*cos(t) + 3)
4、使用Taylor幂级数分别展开函数
syms x
y=log(x+sqrt(1+x^2));
y1=taylor(y,x)
z=(1+4.2*x^2)^0.2;
z1=taylor(z,x)
returns
y1 =
(3*x^5)/40 - x^3/6 + x
5、已知,求下面微分方程的通解。
syms u(t) y(t) t
u(t)=exp(1)^(-5*t)*cos(2*t+1)+5
eqns=[diff(y,t,4)+10*diff(y,t,3)+35*diff(y,t,2)+50*diff(y,t,1)+24*y==5*diff(u,t,2)+4*diff(u,t,1)+2*u];
dsolve(eqns)
6、求解下面的微分方程组的解(如果无法达到通解可以计算数值解)
s=dsolve('D2x==x-y-z','D2y==y-x-z','D2z==z-x-y','x(0)=1','y(0)=0','z(0)=0','Dx(0)=0','Dy(0)=0','Dz(0)=0')
returns
s.x
ans =
exp(2^(1/2)*t)/3 + exp(-2^(1/2)*t)/3 + cos(t)/3
>> s.y
ans =
cos(t)/3 - exp(-2^(1/2)*t)/6 - exp(2^(1/2)*t)/6
>> s.z
ans =
cos(t)/3 - exp(-2^(1/2)*t)/6 - exp(2^(1/2)*t)/6
第二问
function dy=ff(t,y)
dy=zeros(4,1)
dy(1)=y(2);
dy(3)=y(4);
dy(2)+2*y(4)*y(1)==2*dy(4)
dy(2)*y(4)+2*y(2)*dy(4)+y(1)*y(4)-y(3)-y(3)==5
f=@(t,x,Z)[-2*x(2)-3*Z(1,1);-0.05*x(1)*x(3)-2*Z(2,2)+2;0.3*x(1)*x(2)*x(3)+cos(x(1)*x(2))+2*sin(0.1*t^2)];
tau=[0.2,0.8];
sol=dde23(f,tau,zeros(3,1),[0,10]);
plot(sol.x,sol.y(1,:))