资源描述:
《数学实验_matlab练习一(修订版)》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、数学实验数学分析部分练习题一、画出以下函数的图像1、x=(-2)*pi:0.1:2*pi;y=sin(x)+cos(x);plot(x,y)2、x=(-2)*pi:0.01:2*pi;y=exp((sin(x)).^3);plot(x,y)3、x=0:0.01:5;y=asin(log(2*x+1));plot(x,y)4、t=0:0.1:2*pi;x=2*((cos(t)).^3);y=2*((sin(t)).^3);plot(x,y)求下列函数的极限1、=0symsx;limit((x.^2-1)/(x
2、.^2+1),x,1)ans=02、symsx;limit((x.^2+1)/(x.^4-1),x,inf)ans=03、symsnsymsum(1/2^n,n,0,inf)ans=24、symsx;limit('(sqrt(2)-sqrt(1+cos(x)))/sin(x)^2',x,0)ans=1/8*2^(1/2)5、symsx;limit('x/(atan(x)+x^2)',x,0)ans=1求下列方程的根1、>>a=[1,0,0,0,-3,-1];>>x=roots(a)x=1.38880.080
3、3+1.3284i0.0803-1.3284i-1.2146-0.33472、functiony=fun(x)y=sin(x)+x+1;fzero('fun',0)ans=-0.51103、p=input('inputanumber:');q=input('inputanumber:');A=[1,0,0,-p,q];x=roots(A)inputanumber:7inputanumber:8x=-1.2556+1.7235i-1.2556-1.7235i1.2556+0.4276i1.2556-0.427
4、6i4、functiony=fun(x)y=x-4*cos(x)+2;fzero('fun',0)ans=0.7966求下列函数的一阶导数1、symsx;diff((sqrt(x)+1)*(1/sqrt(x)-1),'x',1)ans=1/2/x^(1/2)*(1/x^(1/2)-1)-1/2*(x^(1/2)+1)/x^(3/2)simple(ans)ans=-1/2*(1+x)/x^(3/2)2、symsx;diff(acos(x+3)-x^2,'x')ans=-1/(-8-x^2-6*x)^(1/2)
5、-2*x3、symst;x=log(1+t^2);y=t-atan(t);a=diff(x,t);b=diff(y,t);dy=a/b;dy=2*t/(1+t^2)/(1-1/(1+t^2))4、symsxy;f=atan(y/x)-log(sqrt(x^2+y^2));a=diff(f,x);b=diff(f,y);g=-a/bsimple(g)ans=(y+x)/(x-y)求下列函数的极值1、>>symsx;y=x^2*exp(-x);f1=diff(y,x)f1=simplify(f1)pretty(
6、f1)crit_pts=solve(f1)ezplot(y)holdonplot(double(crit_pts),double(subs(y,crit_pts)),'ro');title('函数的极大值和极小值');text(-1,250,'极小值');text(1,250,'极大值');holdofff1=2*x*exp(-x)-x^2*exp(-x)f1=-x*exp(-x)*(x-2)-xexp(-x)(x-2)crit_pts=202、>>symsx;y=2*x^3+3*x^2-12*x+5;f1
7、=diff(y,x)f1=simplify(f1)pretty(f1)crit_pts=solve(f1)ezplot(y)holdonplot(double(crit_pts),double(subs(y,crit_pts)),'ro');title('函数的极大值和极小值');text(0,50,'极小值');text(-3,80,'极大值');holdofff1=6*x^2+6*x-12f1=6*(x-1)*(x+2)6(x-1)(x+2)crit_pts=1-23、>>symsx;y=x^(1/x)
8、;f1=diff(y,x)f1=simplify(f1)pretty(f1)crit_pts=solve(f1)ezplot(y)holdonplot(double(crit_pts),double(subs(y,crit_pts)),'ro');title('函数的极大值和极小值');text(2.6,1.37,'极大值');holdofff1=x^(1/x-1)/x-(x^(1/x)*log(x))/x^2f