matlab第七章课后题答案
第⼀题分解因式
syms x y z
>> A=x^9-1;
>> factor(A)
ans =
(x-1)*(x^2+x+1)*(x^6+x^3+1) 解(1)
>> B=x^4+x^3+2*x^2+x+1;
>> factor(B)
ans =
(x^2+1)*(x^2+x+1) 解(2)
> C=125*x^6+75*x^4+15*x^2+1;
>> factor(C)
ans =
(5*x^2+1)^3 解(3)
> D=x^2+y^2+z^2+z*(x*y+y*z+z*x);
>> factor(D)
ans =
x^2+y^2+z^2+z*x*y+y*z^2+z^2*x 解(4)
第⼆题化简表达式
syms x y a b
>> s=y/x+x/y;
>> simplify(s)
ans =
(x^2+y^2)/x/y 解(1)s=sqrt(a+sqrt(a^2-b))/2+sqrt(a-sqrt(a^2-b))/2; ans =
1/2*(a+(a^2-b)^(1/2))^(1/2)+1/2*(a-(a^2-b)^(1/2))^(1/2) 解(2)
s=2*cos(x)^2*x-sin(x)^2*x;
>> simplify(s)
ans =
x*(3*cos(x)^2-1) 解(3)s=sqrt(3+2*(sqrt2))
第三题求函数的极限
> syms x
>> f=(x^2-6*x+8)/(x^2-5*x+4);
> limit(f,x,4)
ans =
2/3 解(1)
>> f=abs(x)/x;
>> limit(f,x,0)
ans =
NaN 解(2)
f=(sqrt(1+x^2)-1)/x;
>> limit(f,x,0)
ans =
0 解(3)
f=(x+1/x)^x;
>> limit(f,x,inf,'left')
ans =
Inf 解(4)
第四题求函数的符号导数
f=3*(x^2)-5*x+1;
>> diff(f)
ans =
6*x-5 解(1)y’
>> diff(f,x,2)
ans =
6 解(1)
> y=sqrt(x+sqrt(x+sqrt(x)));
>> diff(y)
ans =
1/2/(x+(x+x^(1/2))^(1/2))^(1/2)*(1+1/2/(x+x^(1/2))^(1/2)*(1+1/2/x^(1/2))) 解(2)
diff(y,x,2)
ans =
-1/4/(x+(x+x^(1/2))^(1/2))^(3/2)*(1+1/2/(x+x^(1/2))^(1/2)*(1+1/2/x^(1/2)))^2+1/2/(x+(x+x^(1/2) )^(1/2))^(1/2)*(-1/4/(x+x^(1/2))^(3/2)*(1+1/2/x^(1/2))^2-1/8/(x+x^(1/2))^(1/2)/x^(3/2)) 解(2)
y=sin(x)-x^2/2;
> diff(y)
ans =
cos(x)-x 解(3)
>> diff(y,x,2)
ans =
-sin(x)-1 解(3)
syms x y z
>> z=x+y-sqrt(x^2+y^2);
>> diff(z,x,y)
ans =
1-1/(x^2+y^2)^(1/2)*y 解(4)
>> diff(y,x)
ans =
0 解(4)
第五题求不定积分
x=sym('x');
>> f=1/(x+a);
>> int(f)
ans =
log(x+a) 解(1)
>> f=(1-3*x)^3;
>> int(f)
ans =
-1/12*(1-3*x)^4 解(2)
>> f=(1/(sin(x)^2*cos(x)^2));
>> int(f)
ans =
1/sin(x)/cos(x)-2/sin(x)*cos(x) 解(3)
>> f=x^2/(sqrt(a^2+x^2));
>> int(f)
ans =
1/2*x*(a^2+x^2)^(1/2)-1/2*a^2*log(x+(a^2+x^2)^(1/2)) 解(4)
第六题求定积分
> x=sym('x');
> int((x*(2-sin(x)^2))^12,0,1)
ans =
-13072167041243000966100527033032931/1439431206610157332070400000000000*sin(1)^19 *cos(1)-63988617583073709724938474490679159346183608452999323027852007/820274272 498737105178830959457441284892917760000000000*cos(1)*sin(1)+417844027386435896683 78350956709518241555640967463723429593/1230411408748105657768246439186161927339 376640000000000*sin(1)^3*cos(1)-6287598784304532394386769772554886862775718358540 017487607/1794349971090987417578692723813152810703257600000000000*sin(1)^7*cos(1)-117903417317/3522410053632*sin(1)^23*cos(1)+9312911877102093870852677177232352401
4639/1529945519744217245425650892800000000000*sin(1)^17*cos(1)-2677966496932891906 2789407028617562008014032541099/6567698857381017597043504106365255680000000000* sin(1)^10-90936661567370530014104030508869215332048771345315401/53375584364747317 6140678428961747763200000000*cos(1)^2+2541573211/146767085568*sin(1)^24+940325057 70279736611460220749/16522396770089041920000000000*sin(1)^20+2704734082846637530 0822998906838403821858600396601/4670363631915390291230936253415292928000000000*
sin(1)^8+5542192477209543230894137867604219553503/255755814666761099367961067520 00000000*sin(1)^16+6290548805350754451916704658025155325352197570086424587493/20 18
643717477360844776029314289796912041164800000000000*sin(1)^9*cos(1)-74888453896 484988301898479573506809/1756135812378578105401344000000000*sin(1)^18-66275838868 9551809679364987359346538465101954279/84285468669723059162058302698354114560000
0000*sin(1)^14+4741716006420769418428944378170996543275038000761225969993/153801 4260935132072210308048982702409174220800000000000*sin(1)^5*cos(1)-273698005143037 11474211657412466731397670944577/100266509581957021396215456910540800000000000*
sin(1)^15*cos(1)+18044178399358284974551495/22109663333532016620601344*sin(1)^21*co
s(1)+159018588498544047612814017616772807534595903672788230889/18504234076875807 7437802687143231383603773440000000000*sin(1)^13*cos(1)-42990929319556261053136947 04999192498272936575705473777243/2220508089225096929253632245718776603245281280 000000000*sin(1)^11*cos(1)+72644795857216400572361363249893595045872001672201/160 1267530942419528422035286885243289600000000*sin(1)^4-179168559345113148705406926 00563709435304263998599/3002376620517036615791316162909831168000000000*sin(1)^6-3 228431702614231399553/6979060395685611307008*sin(1)^22+1809464903223467961506769 2014871302547716716561173/8669362491742943228097425420402137497600000000*sin(1)^1
2+908212034006674534482628671295497731536658010905190650989336891/1066356554248 3582367324802472946736703607930880000000000
解(1)
int(x/(x^2+x+1),-1,1)
ans =
1/2*log(3)-1/6*3^(1/2)*pi 解(2)> int((x*sin(x))^2,0,pi)
ans =
1/6*pi^3-1/4*pi 解(3)
第七题求级数之和
n=sym('n');
>> s1=symsum((-1)*(2*n+1)/2^n,n,0,inf)
s1 =
-6 解(1)>> s2=symsum(x^(2*n-1)/2^n-1,n,1,inf)
s2 =
sum(x^(2*n-1)/(2^n)-1,n = 1 .. Inf) 解(2)s3=symsum(1/(2*n+1)^2,n,0,inf)
s3 =
1/8*pi^2 解(3)
s4=symsum(1/n*(n+1)*(n+1),n,1,inf)
s4 =
Inf 解(4)第⼋题求泰勒展开式
>> x=sym('x');
f1=x^4-5*x^3+x^2-3*x+4;
f2=(exp(x)+exp(-x))/2;
f3=tan(x);
f4=sin(x)^2;
f5=sqrt(x^3+x^2+5*x+3);
taylor(f1,4,4)
ans =
-140+21*x+37*(x-4)^2+11*(x-4)^3 解(1)
matlab考试题库及答案taylor(f2,5,0)
ans =
1+1/2*x^2+1/24*x^4 解(2)
taylor(f3,3,2)
ans =
tan(2)+(1+tan(2)^2)*(x-2)+tan(2)*(1+tan(2)^2)*(x-2)^2 解(3)
taylor(f4,8,0)
ans =
x^2-1/3*x^4+2/45*x^6 解(4)
taylor(f5,5,0)
ans =
3^(1/2)+5/6*3^(1/2)*x-13/72*3^(1/2)*x^2+137/432*3^(1/2)*x^3-2909/10368*3^(1/2)* x^4 解(5)第九题求⾮线性⽅程的解
x=solve(‘a*x^2+b*x+c=0’,’x’)
x =
1/2/a*(-b+(b^2-4*a*c)^(1/2))
1/2/a*(-b-(b^2-4*a*c)^(1/2)) 解(1)
x=solve(‘2*sin(3*x-pi/4)=1’,’x’)
x =
5/36*pi 解(2)
x=solve(‘sin(x)-sqrt(3)*cos(x)=sqrt(2)’,’x’)
x =
-atan(2*(1/4*2^(1/2)+1/4*3^(1/2)*2^(1/2))*2^(1/2)/(3^(1/2)-1))+pi
-atan(2*(1/4*2^(1/2)-1/4*3^(1/2)*2^(1/2))*2^(1/2)/(1+3^(1/2)))-pi 解(3)
x=solve(‘x^2+10*(x-1)*sqrt(x)+14*x+1=0’,’x’)
x =
(2^(1/2)-1)^2
(-4+17^(1/2))^2 解(4)
第⼗题求⽅程组的解

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。