华南农业大学-数学实验答案

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

实验11(log(pi)+log10(pi)-exp(1.2))^2/81ans=0.03482symsxyz=x^2+exp(x+y)-y*log(x)-3z=exp(x+y)-y*log(x)+x^2-3x=2;y=4;eval(z)ans=401.65623(1)f=[3-12103];r=roots(f)r=0.7330+0.7416i0.7330-0.7416i-0.8952+0.0000i-0.1188+1.0066i-0.1188-1.0066i(2)g=@(x)1/3*x.^3+x.^2-3*x-1;[minimizer,minimum]=fminbnd(g,-1,2)minimizer=1.0000minimum=-2.66674cleara=5.3;b=[13;25];whoYourvariablesare:abwhosNameSizeBytesClassAttributesa1x18doubleb2x232doublesaveD:\exe01.mat5(1)用plot作图的m-文件%ex1_5_1_plotx=-2:0.01:2;y=x.^2.*sin(x.^2-x-2);plot(x,y)用fplot作图的m-文件%ex1_5_1_fploty=@(x)x.^2.*sin(x.^2-x-2);fplot(y,[-22])(2)作图的m-文件%ex1_5_2x=0:pi/180:2*pi;y1=x.^2.*sin(x.^2-2);y2=x.^2.*cos(x.^2-2);y3=2*sin(2*x);y4=2*cos(2*x);subplot(2,2,1);plot(x,y1)subplot(2,2,2);plot(x,y2)subplot(2,2,3);plot(x,y3)subplot(2,2,4);plot(x,y4)实验21结果是在CommandWindow.输出结果是(文件名是“ex2_1”)ex2_1sum=11product=402函数的m-文件(函数名改为“ex2_2”)functiony=ex2_2(x)y=1+x+x.^2+x.^3+x.^4+x.^5;计算ex2_2(-3),ex2_2(2),ex2_2(5),ex2_2(7)y=ex2_2([-3257])y=-182633906196083函数的m-文件(函数名改为“ex2_3”)functiony=ex2_3(x)ifx1y=x^2+x+1;elsey=log(x)+sin(x)+exp(2);end计算ex2_3(-7),ex2_3(1),ex2_3(5),ex2_3(9)ex2_3(-7),ex2_3(1),ex2_3(5),ex2_3(9)ans=43ans=8.2305ans=8.0396ans=9.99844函数的m-文件(函数名改为“ex2_4”)functiony=ex2_4(x)y=exp(ex2_2(x))+2*sin(ex2_2(x))+ex2_2(x).^2;计算ex2_4(2),ex2_4(4),ex2_4(6),ex2_4(10)y=ex2_4([24610])y=1.0e+27*2.2938InfInfInf5%ex2_5clcn=input('请输入次数:');r=100/2^n;d=100+r;i=n-2;whilei=0d=d+100/2^i;i=i-1;endfprintf('皮球在第%d次的反弹高度是%f\n',n,r)fprintf('皮球在第%d次反弹到达最高点时经过的总路程是%f\n',n,d)程序ex2_5输出样例请输入次数:3皮球在第3次的反弹高度是12.500000m皮球在第3次反弹到达最高点时经过的总路程是262.500000m实验31zeros(size(A))ans=00002(1)A(1,:)ans=1-22(2)A(:,2)ans=-205(3)A([23],[23])ans=05533(1)det(A)ans=13.0000rank(A)ans=3inv(A)ans=-1.92311.2308-0.7692-0.30770.07690.07691.1538-0.53850.4615(2)2*A-Bans=1-7040130115A*Bans=111213417170-8A.*Bans=1-6860-152-53A'ans=131-2052534A+Bans=25105493-682*A-Bans=1181830-913A*Bans=19-320222320-4-14A.*Bans=16246020257A/Bans=0.07141.5000-1.78571.8571-1.00001.5714-3.64295.5000-5.9286A\Bans=2.0714-2.85710.7857-0.16070.67860.4821-0.12500.75000.3750A.^Bans=1.0e+03*0.00100.00801.29600.00800.00101.02400.0010-0.00020.00705(1)A=[-120;-230;302];[V,D]=eig(A),r=rank(V)V=00.30150.301500.30150.30151.0000-0.9045-0.9045D=200010001r=2不可以对角化.(2)B=[-211;020;-413];[V,D]=eig(B),r=rank(V)V=-0.7071-0.24250.3015000.9045-0.7071-0.97010.3015D=-100020002r=3可以对角化,𝐃𝐃=𝐕𝐕−1𝐁𝐁𝐕𝐕.6.A=[1201;130-1;-1-110];r=rank(A)r=3线性无关.7方法1A=[25-8;43-9;23-5;18-7];b=[8;9;7;12];x=linsolve(A,b)x=3.00002.00001.0000方法2R=rref([A,b])R=1003010200110000即𝐱𝐱=(3,2,1)′.8A=[2-13;211;412];x=linsolve(A,zeros(3,1))x=000实验41(1)symsnlimit(sqrt(n+sqrt(n))-sqrt(n),n,inf)ans=1/2(2)symsxlimit((1-2/x)^(3*x),x,inf)ans=exp(-6)(3)symsxlimit(sin(x)/(x^3+3*x))ans=1/32(1)symsxy=x^10+10^x+log10(x);diff(y)ans=1/(x*log(10))+10^x*log(10)+10*x^9(2)symsxy=log(1+x);x=1;eval(diff(y,2))ans=-0.2500(3)symsxyz=exp(2*x)*(x+y^2+2*y);[diff(z,x),diff(z,y)]ans=[exp(2*x)+2*exp(2*x)*(y^2+2*y+x),exp(2*x)*(2*y+2)](4)symsxyz=sin(3*x+2*y)^2;[diff(z,x),diff(z,y)]ans=[6*cos(3*x+2*y)*sin(3*x+2*y),4*cos(3*x+2*y)*sin(3*x+2*y)](5)symsxyudxdyduz=log(x^2+y^2+u^2);dz=simplify(diff(z,x)*dx+diff(z,y)*dy+diff(z,u)*du)dz=(2*(du*u+dx*x+dy*y))/(u^2+x^2+y^2)3(1)symsxint(cos(2*x)*cos(3*x))ans=sin(5*x)/10+sin(x)/2(2)symsxabsimplify(int(1/(x*(sqrt(log(x)+a)+sqrt(log(x)+b))),x))ans=(2*((a+log(x))^(3/2)-(b+log(x))^(3/2)))/(3*(a-b))4(1)fun=@(x)sqrt(sin(x).^3-sin(x).^5);q=integral(fun,0,pi)q=0.8000(2)fun=@(x)exp(-x.^2/2);q=integral(fun,0,1)q=0.8556(3)symsxq=int((x^2+5)/(x^2+2),x,0,2)q=(3*2^(1/2)*atan(2^(1/2)))/2+25(1)fun=@(x)x.^2.*log(x);q=integral(fun,1,exp(1))q=4.5746(2)fun=@(x,y)y.^2./x.^2;q=integral2(fun,1/2,2,1,2)q=3.5000(3)方法1fun=@(x,y)x.*y;ymin=@(x)x.^2;ymax=@(x)x+2;q=integral2(fun,-1,2,ymin,ymax)q=5.6250方法2symsxyq=int(int(x*y,y,x^2,x+2),x,-1,2)q=45/86(1)y=dsolve('(1+x)*D2y+Dy=0','x')y=C3-C2*log(x+1)(2)y=dsolve('Dy=y+x','y(0)=1','x')y=2*exp(x)-x-1

1 / 13
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功