理工数学实验答案matlab.docx
- 文档编号:6826583
- 上传时间:2023-01-10
- 格式:DOCX
- 页数:19
- 大小:16.67KB
理工数学实验答案matlab.docx
《理工数学实验答案matlab.docx》由会员分享,可在线阅读,更多相关《理工数学实验答案matlab.docx(19页珍藏版)》请在冰豆网上搜索。
理工数学实验答案matlab
第五章
5.
symsxyuvduxduydvxdvy
>>f=x^2+y^2+u^2+v^2-R^2;
>>g=x+y+u+v;
>>fx=diff(f,'x');fy=diff(f,'y');fu=diff(f,'u');fv=diff(f,'v');
>>gx=diff(g,'x');gy=diff(g,'y');gu=diff(g,'u');gv=diff(g,'v');
>>ffx=fu*dux+fv*dvx+fx;
>>ggx=gu*dux+gv*dvx+gx;
>>[dux,dvx]=solve(ffx,ggx,'dux','dvx')
dux=
-(x-v)/(u-v)
dvx=
(-u+x)/(u-v)
>>ffy=fu*duy+fv*dvy+fy;
>>ggy=gu*duy+gv*dvy+gy;
>>[duy,dvy]=solve(ffy,ggy,'duy','dvy')
duy=
-(y-v)/(u-v)
dvy=
(-u+y)/(u-v)
6.
symsxyz
>>f=x+y+z-exp(-(x+y+z));
>>fx=diff(f,'x');fz=diff(f,'z');
>>dzx=-fx/fz;
>>fxy=diff(dzx,'y')
fxy=
exp(-x-y-z)/(1+exp(-x-y-z))+(-1-exp(-x-y-z))/(1+exp(-x-y-z))^2*exp(-x-y-z)
7.
symsxy
>>z=x^2-x*y-2*y^2;
>>zx=diff(z,'x');zy=diff(z,'y');
>>fzx=inline(zx);
>>fzy=inline(zy);
>>a=pi/6;b=pi/3;
>>f1=fzx(1,2)*cos(a)+fzy(1,2)*cos(b)
f1=
-4.5000
8.
symst
>>x=sin(t)
>>y=cos(t)
>>z=t;
>>dx=diff(x,'t');dy=diff(y,'t');dz=diff(z,'t');
>>x1=inline(dx);
>>x2=inline(dy);
>>x3=inline(dz);
>>x10=x1
(1)
x10=x1(pi/4)
x10=
0.7071
>>x20=x2(pi/4)
x20=
-0.7071
>>x30=x3(pi/4)
x30=
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(1/2)*a
-1/3*3^(1/2)*a
1/3*3^(1/2)*a
-1/3*3^(1/2)*a
1/3*3^(1/2)*a
-1/3*3^(1/2)*a
>>V=x.*y.*z
V=
0
0
0
0
0
0
-2/9*a^3*3^(1/2)
2/9*a^3*3^(1/2)
-2/9*a^3*3^(1/2)
2/9*a^3*3^(1/2)
2/9*a^3*3^(1/2)
-2/9*a^3*3^(1/2)
2/9*a^3*3^(1/2)
-2/9*a^3*3^(1/2)
第六章
1.
symsxy
>>f=x*y;
>>y1=2*x;
>>y2=x^2+1;
>>f1=int(f,y,y1,y2);
>>I=int(f1,x,0,1)
I=
1/12
2.
symsxyrt
>>x=r*cos(t);
>>y=r*sin(t);
>>f=exp(-r^2);
>>f1=int(f*r,r,0,1);
>>I=int(f1,t,0,2*pi)
I=
pi-exp(-1)*pi
3.
symsxyzsraA
>>x=r*sin(s)*cos(t);
>>y=r*sin(s)*sin(t);
>>z=r*cos(s);
>>f=x^2+y^2;
>>r1=a;r2=A;
>>s1=0;s2=pi/2;
>>t1=0;t2=2*pi;
>>f21=int(f*r^2*sin(s),r,r1,r2);
>>f22=int(f21,s,s1,s2);
>>I=int(f22,t,t1,t2)
I=
4/15*pi*A^5-4/15*pi*a^5
4.
symsxyzstr
x=r*sin(s)*cos(t);
y=r*sin(s)*sin(t);
z=r*cos(s);
f=z*log(x^2+y^2+z^2+1)/(x^2+y^2+z^2+1);
r1=0;r2=1;
s1=0;s2=pi/2;
t1=0;t2=2*pi;
f1=int(f*r^2*sin(s),r,r1,r2);
f2=int(f1,s,s1,s2);
I=int(f2,t,t1,t2)
I=
4/15*pi*A^5-4/15*pi*a^5
5.
>>symsx
>>f=1/x;
>>fx=diff(f,'x');
>>I=int(x*sqrt(1+fx^2),x,1/2,1)
I=
-1/8*17^(1/2)+1/2*atanh(4/17*17^(1/2))+1/2*2^(1/2)-1/2*atanh(1/2*2^(1/2))
6.
symsxyrt
>>z=sqrt(x^2+y^2);
>>zx=diff(z,'x');zy=diff(z,'y');
>>dS=sqrt(1+zx^2+zy^2);
>>f=(x^2+y^2)*dS;
>>x=r*cos(t);y=r*sin(t);
>>
>>g=subs(f);
>>r1=0;r2=1;
>>t1=0;t2=2*pi;
>>f1=int(g*r,r,r1,r2);
>>I=int(f1,t,t1,t2)
I=
1/2*2^(1/2)*pi
第七章
二
1.symsn
p=limit('(1/(n+1))/(1/n)',n,inf)
r=1/p
r=
1
2.symsn
p=limit('(1/factorial(n+1))/(1/factorial(n))',n,inf)
r=1/p
r=
Inf
3.symsn
>>p=limit('(n+1)/n',n,inf)
>>r=1/p
r=
1
4.symsn
p=limit('(2^(n+1)/((n+1)^2+1))/(2^n/(n^2+1))',n,inf);
r=1/p
r=
1/2
三.
symsx
f=taylor('sin(x)',x,1*(pi/4),6)
f=
1/2*2^(1/2)+1/2*2^(1/2)*(x-1/4*pi)-1/4*2^(1/2)*(x-1/4*pi)^2-1/12*2^(1/2)*(x-1/4*pi)^3+1/48*2^(1/2)*(x-1/4*pi)^4+1/240*2^(1/2)*(x-1/4*pi)^5
四.
symsx
f=taylor('1/(x^2+1)',x,8)
f=
1-x^2+x^4-x^6
五.
symsx
f=taylor('1/(x^2+3*x+2)',x,-4,7)
f=
13/18+5/36*x+19/216*(x+4)^2+65/1296*(x+4)^3+211/7776*(x+4)^4+665/46656*(x+4)^5+2059/279936*(x+4)^6
六.
symsx
f=taylor('(1+x)*log(1+x)',x,7)
f=
x+1/2*x^2-1/6*x^3+1/12*x^4-1/20*x^5+1/30*x^6
七.
symstyx
>>y=taylor('1/sqrt(1-t^2)',t,4);
>>y0=int(y,0,x)
y0=
x+1/6*x^3
八.
symsxy
y=taylor('log(1+x)',x,8);
x=2;
y0=eval(y)
y0=
12.6857
九.
symsxy
y=taylor('2*(1+x)^(1/9)',x,8);
x=1/2^6
y0=eval(y)
y0=
2.0034
十.
(1)
symsxn
f=3*x^2+1;
a0=int(f,x,-pi,pi)/pi
a0=
(2*pi^3+2*pi)/pi
an=int(f*cos(n*x),x,-pi,pi)/pi
an=
2*(-6*sin(pi*n)+n^2*sin(pi*n)+3*n^2*sin(pi*n)*pi^2+6*n*cos(pi*n)*pi)/n^3/pi
bn=int(f*sin(n*x),x,-pi,pi)/pi
bn=
0
(2)symsxn
f=exp(2*x);
a0=int(f,x,-pi,pi)/pi
a0=
1/2*(-1+exp(4*pi))*exp(-2*pi)/pi
an=int(f*cos(n*x),x,-pi,pi)/pi
an=
(-2*cos(pi*n)+n*sin(pi*n)+2*exp(4*pi)*cos(pi*n)+exp(4*pi)*n*sin(pi*n))*exp(-2*pi)/(4+n^2)/pi
bn=int(f*sin(n*x),x,-pi,pi)/pi
bn=
-(-n*cos(pi*n)-2*sin(pi*n)+exp(4*pi)*n*cos(pi*n)-2*exp(4*pi)*sin(pi*n))*exp(-2*pi)/(4+n^2)/pi
第八章
1.
dsolve('Dy*x-y*logy=0','x')
ans=
C1*x^logy
2.
dsolve('x^2+y^2-x*y*Dy=0','x')
ans=
(2*log(x)+C1)^(1/2)*x
-(2*log(x)+C1)^(1/2)*x
3.
dsolve('Dy+y*cos(x)=exp(-sin(x))','x')
ans=
exp(-sin(x))*(x+C1)
4.
dsolve('(x-2)*Dy=y+2*(x-2)^3','x')
ans=
(x^2-4*x+C1)*(x-2)
5.
dsolve('D2y+6*Dy+13*y=0','x')
ans=
exp(-3*x)*(C1*sin(2*x)+C2*cos(2*x))
6.
dsolve('D4y-2*D3y+D2y=0','x')
ans=
C1*exp(x)+C2*exp(x)*x+C3+C4*x
7.
dsolve('2*D2y+5*Dy=5*x^2-2*x-2*x-1','x')
ans=
-4/5*x^2+1/3*x^3-2/5*exp(-5/2*x)*C1+11/25*x+C2
8.
dsolve('cos(x)*sin(y)*Dy=cos(y)*sin(x)','y(0)=pi/4')
ans=
acos(exp(-t*tan(x)-1/2*log
(2)))
二
1.dsolve('cos(x)*sin(y)*Dy=cos(y)*sin(x)','y(0)=pi/4')
ans=
acos(exp(-t*tan(x)-1/2*log
(2)))
2.
dsolve('Dy=exp(2*x-y)','y(pi/2)=e')
ans=
2*x+log(t-1/2*(exp(2*x-e)*pi-2)/exp(2*x-e))
3.
dsolve('Dy-y*tan(x)=sec(x)','y(0)=0')
ans=
-exp(t*tan(x))/sin(x)*exp(-t*sin(x)/cos(x))+exp(t*tan(x))/sin(x)
4.
dsolve('Dy+((2-3*x^2)*y)/(x^3)=1','y
(1)=0')
ans=
-x^3/(-2+3*x^2)+exp((-2+3*x^2)*t/x^3)*x^3/(-2+3*x^2)/exp((-2+3*x^2)/x^3)
5.
dsolve('D2y=exp(2*y)','y(0)=0,Dy(0)=0')
ans=
1/2*log(1-tanh(t/RootOf(_Z^2+1))^2)
6.
solve('D2y-3*Dy-4*y=0','y(0)=2,Dy(0)=0')
ans=
8/5*exp(-t)+2/5*exp(4*t)
7.
f=dsolve('D2y-10*Dy+9*y=exp(2*x)','y(0)=6/7,Dy(0)=33/7')
f=
exp(t)*(3/8-1/8*exp(2*x))+exp(9*t)*(27/56+1/72*exp(2*x))+1/9*exp(2*x)
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 理工 数学 实验 答案 matlab
![提示](https://static.bdocx.com/images/bang_tan.gif)