matlab课后习题答案(附图)习题2.1画出下列常见曲线的图形y (1)⽴⽅抛物线3x命令:syms x y;ezplot('x.^(1/3)')(2)⾼斯曲线y=e^(-X^2);命令:clearsyms x y;ezplot('exp(-x*x)')(3)笛卡尔曲线命令:>> clear>> syms x y;>> a=1;>> ezplot(x^3+y^3-3*a*x*y)(4)蔓叶线命令:>> clear>> syms x y;>> a=1ezplot(y^2-(x^3)/(a-x))(5)摆线:()()tsin-=,=-by1命令:>> clear>> t=0:0.1:2*pi;>> x=t-sin(t);>>y=2*(1-cos(t)); >> plot(x,y)7螺旋线命令:>> clear >> t=0:0.1:2*pi; >> x=cos(t); >> y=sin(t); >> z=t;>>plot3(x,y,z)(8)阿基⽶德螺线命令:clear>> theta=0:0.1:2*pi;>> rho1=(theta);>> subplot(1,2,1),polar(theta,rho1)(9) 对数螺线命令:cleartheta=0:0.1:2*pi;rho1=exp(theta);subplot(1,2,1),polar(theta,rho1)(12)⼼形线命令:>> clear >> theta=0:0.1:2*pi; >> rho1=1+cos(theta); >> subplot(1,2,1),polar(theta,rho1)练习2.21. 求出下列极限值(1)nnn n3→命令:>>syms n>>limit((n^3+3^n)^(1/n)) ans = 3(2))121(lim n n n n ++-+∞→命令:>>syms n>>limit((n+2)^(1/2)-2*(n+1)^(1/2)+n^(1/2),n,inf) ans = 0(3)x x x 2cot lim 0→命令:syms x ;>> limit(x*cot(2*x),x,0) ans = 1/2 (4))(coslimcm xx ∞→命令:syms x m ; limit((cos(m/x))^x,x,inf) ans = 1(5))111(lim 1--→exx x命令:syms x>> limit(1/x-1/(exp(x)-1),x,1) ans =(exp(1)-2)/(exp(1)-1) (6))(2lim x x xx -+∞>> limit((x^2+x)^(1/2)-x,x,inf)ans = 1/2练习2.41. 求下列不定积分,并⽤diff 验证:(1)+x dxcos 1>>Clear >> syms x y >> y=1/(1+cos(x)); >> f=int(y,x) f =tan(1/2*x) >> y=tan(1/2*x); >> yx=diff(y ,x); >> y1=simple(yx) y1 =1/2+1/2*tan(1/2*x)^2 (2)+exdx1clear syms x yy=1/(1+exp(x));f=int(y,x) f =-log(1+exp(x))+log(exp(x)) syms x yy=-log(1+exp(x))+log(exp(x)); yx=diff(y,x); y1=simple(yx) y1 = 1/(1+exp(x)) (3)dx x x ?sin 2syms x yy=x*sin(x)^2; >> f=int(y,x) f =x*(-1/2*cos(x)*sin(x)+1/2*x)-1/4*cos(x)^2-1/4*x^2 clearsyms x y y=x*(-1/2*cos(x)*sin(x)+1/2*x)-1/4*cos(x)^2-1/4*x^2; yx=diff(y,x); >> y1=simple(yx) y1 = x*sin(x)^2 (4)xdx ?sec3syms x y y=sec(x)^3;f=int(y,x) f =1/2/cos(x)^2*sin(x)+1/2*log(sec(x)+tan(x)) clear syms x yy=1/2/cos(x)^2*sin(x)+1/2*log(sec(x)+tan(x)); yx=diff(y,x); y1=simple(yx) y1 =1/cos(x)^32. 求下列积分的数值解 1)dx x-10clearsyms xy=int(x^(-x),x,0,1) y =int(x^(-x),x = 0 .. 1) vpa(y,10) ans =1.291285997 2)xdx e x cos3202?πclearsyms xy=int(exp(2*x)*cos(x)^3,x, clear syms xy=int((1/(2*pi)^(1/2))*exp(-x^2/2),x,0,1) y =7186705221432913/36028797018963968*erf(1/2*2^(1/2))*2^(1/2)*pi^(1/0,2*pi) y =22/65*exp(pi)^4-22/65vpa(ans,10)(3)dx xe21221-π>> clear >> syms x>> y=int(1/(2*pi)^(1/2)*exp(-x^2/2),0,1); >> vpa(y,14) ans =.341344746068552(4)>> clear >> syms x>> y=int(x*log(x^4)*asin(1/x^2),1,3); Warning: Explicit integral could not be found. > In sym.int at 58 >> vpa(y,14) ans = 2.45977212823752(5) >> clear >> syms x1判断下列级数的收敛性,若收敛,求出其收敛值。