MATLAB作业2参考答案(最新整理)_第1页
MATLAB作业2参考答案(最新整理)_第2页
MATLAB作业2参考答案(最新整理)_第3页
免费预览已结束,剩余1页可下载查看

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、matlab 作业二参考答案51、 试求出如下极限。(x + 2)x+2 (x + 3)x+3x2 y + xy31- cos(x2 + y2 )(1) limx(x + 5)2 x+5,(2) limx-1 y2(x + y)3, (3) limx0 y0(x2 + y2)ex2 + y2【求解】极限问题可以由下面语句直接求解。 syms x; f=(x+2)(x+2)*(x+3)(x+3)/(x+5)(2*x+5); limit(f,x,inf)ans = exp(-5) syms x yfa=(x2*y+x*y3)/(x+y)3; limit(limit(fa,x,-1),y,2) an

2、s =-6 fc=(1-cos(x2+y2)*exp(x2+y2)/(x2+y2); limit(limit(fc,x,0),y,0)ans = 02、 试求出下面函数的导数。x sin x 1- ex(1) y(x) =,(2) atan y = ln(x2 + y2 )x【求解】由求导函数diff() 可以直接得出如下结果,其中(2) 为隐函数,故需要用隐函数求导公式得出导数。 syms x;f=sqrt(x*sin(x)*sqrt(1-exp(x); simple(diff(f) ans =1/2/(x*sin(x)*(1-exp(x)(1/2)(1/2)*(sin(x)*(1-exp(

3、x)(1/2)+x*cos(x)*(1-exp(x)(1/2)-1/2*x*sin(x)/(1-exp(x)(1/2)*exp(x) syms x,y; f=atan(y/x)-log(x2+y2); f1=simple(-diff(f,x)/diff(f,y)f1 =(y+2*x)/(x-2*y)3、 假设u = cos-1xy,试验证2uxy2u=。yx【求解】证明二者相等亦可以由二者之差为零来证明,故由下面的语句直接证明。 syms x y; u=acos(x/y); diff(diff(u,x),y)-diff(diff(u,y),x) ans =0xy -t2x 2 f2 f2 f4

4、、 假设 f (x, y) = 0edt ,试求 y x2- 2+。xyy2【求解】由下面的命令可以得出所需结果。 syms x y tf=int(exp(-t2),t,0,x*y);x/y*diff(f,x,2)-2*diff(diff(f,x),y)+diff(f,y,2) simple(ans)ans =-2*exp(-x2*y2)*(-x2*y2+1+x3*y) 3x + ey z5、 假设已知函数矩阵 f (x, y, z) = x3 + y2 sin z ,试求出其 jacobi 矩阵。【求解】jacobi 矩阵可以由下面的语句直接得出。 syms x y zf=3*x+exp(y

5、)*z; x3+y2*sin(z); jacobian(f,x,y,z)ans = 3, exp(y)*z, exp(y) 3*x2, 2*y*sin(z), y2*cos(z)6、 试求解下面的不定积分问题。x(x +1)ax(1) i (x) = x + 1+ xdx ,(2) i (x) = xecos bxdx【求解】(1)可以用下面的语句求出问题的解 syms x; f=sqrt(x*(x+1)/(sqrt(x)+sqrt(x+1);int(f,x)(2) 可以求出下面的结果 syms a b x f=x*exp(a*x)*cos(b*x); int(f,x)7、试求解下面的定积分或

6、无穷积分。 cos x11+ x2x(1) i = 0dx ,(2) i = 0 1+ x4 dx【求解】 可以直接求解 syms x; int(cos(x)/sqrt(x),x,0,inf) ans =1/2*2(1/2)*pi(1/2) 可以得出 syms x; int(1+x2)/(1+x4),x,0,1) ans =1/4*2(1/2)*pi8、假设 f (x) = e-5x sin(3x +p/ 3) ,试求出积分函数 r(t) = t f (x) f (t + x)dx 。0【求解】定义了x 的函数,则可以由subs() 函数定义出t +x 的函数,这样由下面的语句可以直接得出r

7、函数。 syms x t; f=exp(-5*x)*sin(3*x+sym(pi)/3); r=int(f*subs(f,x,t+x),x,0,t); simple(r)ans =1/1360*(15*exp(t)10*3(1/2)*cos(3*t)-25*cos(9*t)+25*exp(t)10*3(1/2)*sin(3*t)-68*cos(3*t)-15*3(1/2)*cos(9*t)-25*3(1/2)*sin(9*t)-15*exp(t)10*sin(3*t)+15*sin(9*t)+ 93*exp(t)10*cos(3*t)/exp(t)159、试对下面函数进行 fourier 幂级

8、数展开。(1) f (x) = (p- x ) sin x,-p x p;(2) f (x) = e x ,-p x syms x; f=(sym(pi)-abs(x)*sin(x);a,b,f=fseries(f,x,10,-pi,pi); f f =1/2*pi*sin(x)+16/9/pi*sin(2*x)+32/225/pi*sin(4*x)+ 48/1225/pi*sin(6*x)+64/3969/pi*sin(8*x)+80/9801/pi*sin(10*x) 可以由下面语句求解,并得出数学公式为 syms x; f=exp(abs(x);a,b,f=fseries(f,x,10,

9、-pi,pi); f vpa(f,10)ans =7.0-7.6*cos(x)+2.1*cos(2.*x)-1.5*cos(3.*x)+.09*cos(4.*x)-.28*cos(5.*x)+.46*cos(6.*x)-.50*cos(7.*x)+.24*cos(8.*x)-.74*cos(9.*x)+.25*cos(10.*x)10、试求出下面函数的 taylor 幂级数展开。x sin t( 1)dt,( 2) ln(x +1+ x2 ).( 3) e-5x sin(3x +p/ 3) 分别关于 x = 0 、0t1- cos(x2 + y2 )x = a 的幂级数展开。(4)对 f (x

10、, y) =taylor 幂级数展开。(x2 + y2 )ex2 + y2关于 x = 1 、 y = 0 进行二维【求解】由下面的语句可以分别求出各个函数的幂级数展开, syms t x; f=int(sin(t)/t,t,0,x);taylor(f,x,15) syms x; f=log(x+sqrt(1+x2); taylor(f,x,15)该函数的前4 项展开 syms x a; f=exp(-5*x)*sin(3*x+sym(pi)/3);taylor(f,x,4,a)该函数需要使用maple 的展开函数。 syms x y; f=(1-cos(x2+y2)/(x2+y2)*exp(

11、x2+y2); f=maple(mtaylor,f,x=1,y,4)+11111111、求级数(+ ) + () +l+ () +l的前 n 项及无穷项的和。22nn232323【求解】下面的语句可以直接求解级数的和。 syms n k; symsum(1/2k+1/3k,k,1,n) ans =-2*(1/2)(n+1)-3/2*(1/3)(n+1)+3/2 symsum(1/2k+1/3k,k,1,inf) ans =3/2当然,无穷级数的和还可以通过极限的方式求出。12、试求出下面的极限。-+11111-(1) limn 22142162-1 +l+ (2n)2,1111p(2) lim

12、 n(nn2+p+ n2+ 2p+ n2+ 3p+l+ n2+ n ) 。【求解】 可以用下面两种方法求解。 syms k n; symsum(1/(2*k)2-1),k,1,inf) ans =1/2 limit( symsum(1/(2*k)2-1),k,1,n),n,inf) ans =1/2 可以由下面的语句直接求解。 syms k n limit(n*symsum(1/(n2+k*pi),k,1,n),n,inf) ans =113、试对下面数值描述的函数求取各阶(2)*dt; x=0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1,1.1,1.2;y=0

13、,2.208,3.206,3.444,3.241,2.816,2.311,1.81, 1.36,0.982,0.679,0.447,0.277;dy1,dx1=diff_ctr(y,x(2)-x(1),1);dy2,dx2=diff_ctr(y,x(2)-x(1),2);dy3,dx3=diff_ctr(y,x(2)-x(1),3);dy4,dx4=diff_ctr(y,x(2)-x(1),4);plot(dx1+x(1),dy1,-,dx2+x(1),dy2,- -,dx3+x(1),dy3,:,dx4+x(1),dy4,-.)另一方法dy1,dx1=diff_ctr(y,x(2)-x(1)

14、,1);subplot(221), plot(dx1,dy1,-)dy2,dx2=diff_ctr(y,x(2)-x(1),2);subplot(222), plot(dx2,dy2,-)dy3,dx3=diff_ctr(y,x(2)-x(1),3);subplot(223),plot(dx3,dy3,:)dy4,dx4=diff_ctr(y,x(2)-x(1),4);subplot(224),plot(dx4,dy4,-.)“”“”at the end, xiao bian gives you a passage. minand once said, people who learn to

15、learn are very happy people. in every wonderful life, learning is an eternal theme. as a professional clerical and teaching position, i understand the importance of continuous learning, life is diligent, nothing can be gained, only continuous learning can achieve better self. only by constantly learning and mastering the latest relevant knowledge, can employees from all walks of

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论