MATLAB习题第七章解答

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

%Exercise 2
syms x;s=x^4-5*x^3+5*x^2+5*x-6;
factor(s)

%Exercise 3
syms a;A=[1 2;2 a];
iA=inv(A),[v,d]=eig(A)

%Exercise 4
syms x y;
limit((3^x+9^x)^(1/x),x,inf)
s1=limit(log(2*x+exp(-y))/sqrt(x^3+y^2),x,0,'right');
s2=limit(s1,y,0,'right')

%Exercise 5
syms k n x;s1=symsum(k^2,k,1,n);s1=simple(s1)
s2=symsum(k^(-2),k,1,inf);s2=simple(s2)
s3=symsum(1/(2*n+1)/(2*x+1)^(2*n+1),n,0,inf);s3=simple(s3)

%Exercise 6
syms x y z;s=sin(x^2*y*z);
s=diff(s,x,2);
s=diff(s,y,1);
s=subs(s,{x,y,z},{1,1,3})


%Exercise 10
syms x y;f=(x-y)^3*sin(x+2*y);Ix=simple(int(f,y,-x,x))

%Exercise 12
%1(3)
syms x;solve(5*x^23-6*x^7+8*x^6-5*x^2)
%1(4)
syms x;solve((2*x+3)^3-4)
%2
syms x;solve(x*log(sqrt(x^2-1)+x)-sqrt(x^2-1)-0.5*x)
vpasolve(x*log(sqrt(x^2-1)+x)-sqrt(x^2-1)-0.5*x,2)
%5
>> syms x y z;[sx,sy,sz]=vpasolve([9*x^2+36*y^2+4*z^2-36,x^2-2*y^2-20*z,16*x-x^3-2*y^2-16*z^2],[x,y,z],[0,0,0])
%6
syms a b;[sa,sb]=vpasolve([a==0.7*sin(a)+0.2*cos(b),b==0.7*cos(a)-0.2*sin(b)],[a,b],[0.5,0.5])
%7
syms x y;[x,y]=solve((x-2)^2+(y-3+2*x)^2-5,2*(x-3)^2+(y/3)^2-4)
vpa(x),vpa(y) %结果虚部接近0, 可舍去

%Exercise 13
%1(1)
s=dsolve('Dy==x+y','y(0)==1','x');subs(s,'x',1:3)

syms x y(x);
s=dsolve(diff(y)==x+y,y(0)==1);subs(s,'x',1:3)
%1(2)
[x,y]=dsolve('Dx==-2*x-3*y','Dy==2*x+y','x(0)==-2.7','y(0)==2.8','t')
ezplot(x,y,[0 10])

syms t x(t) y(t);
[sx,sy]=dsolve(diff(x)==-2*x-3*y,diff(y)==2*x+y,x(0)==-2.7,y(0)==2.8)
ezplot(sx,sy,[0 10])
%1(3)
dsolve('D2y-0.01*Dy^2+2*y==sin(t)','y(0)==0','Dy(0)==1','t')(解不出)
%1(4)
x=dsolve('2*D2x-5*Dx+3*x==90*exp(2*t)','x(0)==2','Dx(0)==1','t')
ezplot(x,[0,2])

syms t x(t);Dx=diff(x);
x=dsolve(2*diff(x,2)-5*diff(x)+3*x==90*exp(2*t),x(0)==2,Dx(0)==1)
ezplot(x,[0,2])
%1(5)
x=dsolve('D2y+(y^2-1)*Dy+y==0','y(0)==2','Dy(0)==0','x')(解不出)
%1(6)
x=dsolve('D2x==-2/t*Dx+(2*x+10*cos(log(t)))/t/t','x(1)==1','x(3)==3','t');
subs(x,'t',[1.5,2,2.5])(解不出)

syms t x(t);
x=dsolve(diff(x,2)==-2/t*diff(x)+(2*x+10*cos(log(t)))/t/t,x(1)==1,x(3)==3)
subs(x,'t',[1.5,2,2.5])(解不出)
%2
y=dsolve('D5y+10*D4y+54*D3y+132*D2y+137*Dy+50*y','t')
%3
[x,y]=dsolve('Dx=-1000.25*x+999.75*y+0.5','Dy=999.75*x-1000.25*y+0.5','x(0)=1','y(0)=-1','t')

相关文档
最新文档