《现代数值计算方法(MATLAB版)》习题参考答案及部分习题解答提示第一章1.1(1)0.5,0.00217%,5;(2)0.5×10−5,0.217%,3;(3)0.5×10−2,0.000217%,6;(4)0.5×102,0.0217%,3.1.2(1)0.5,0.014%,4;(2)0.5×10−4,0.11%,3;(3)0.5×10−3,0.0017%,5;(4)0.5×10−9,0.017%,4.1.3(1)3.146,0.5×10−4;(2)3.1416,0.5×10−4;(3)3.14159.1.4提示:12(a1+1)×10−(n−1)=10−4⇒n=5−lg2−lg(a1+1)⇒4−lg2≤n≤5−2lg2⇒3.699≤n≤4.3976⇒n=3.1.5|εr(x)|≤12a1×10−2≤0.5×10−2.1.6提示:12×2×10−(n−1)10−3⇒n4−2lg2⇒n=4.1.7提示:12(a1+1)×10−(n−1)=3×10−3⇒n=4−lg6−lg(a1+1)⇒3−lg6≤n≤3−lg1.2⇒2.2218≤n≤2.9208⇒n=2.1.8提示:x1,2=56+√562−42=28±√783,x1=28+27.982=55.982≈55.98,x2=28−√783=282−78128+√783=155.982≈0.01786.1.10提示:(1)sin(x+y)−sinx=2siny2cos(x+y2),(2)1−cos1◦=1−cos21◦1+cos1◦=sin21◦1+cos1◦,(3)ln(√1010+1−105)=ln1√1010+1+105=−ln(√1010+1+105).1.11(1)(A)比较准确;(2)(A)比较准确.1.12算法2准确.在算法1中,ε0≈0.2231带有误差0.5×10−4,而这个误差在以后的每次计算中顺次以41,42,···传播到In中.而算法2中的误差是按14n减少的,是稳定的计算公式.第二章2.1提示:因B奇异,故∃x̸=0,使得Bx=0.于是,Ax=(A−B)x,x=A−1(A−B)x,∥x∥≤∥A−1∥∥A−B∥∥x∥,1≤∥A−1∥·∥A−B∥,即∥A−1∥≥1∥A−B∥.2.2∥x∥1=9,∥x∥2=√29,∥x∥∞=4;∥A∥1=8,∥A∥2=4√2,∥A∥∞=6.2.3提示:迭代矩阵BJ=0−0.4−0.4−0.40−0.8−0.4−0.80,|λI−BJ|=λ0.40.40.4λ0.80.40.8λ=(λ−0.8)(λ2+0.8λ−0.32)=0,λ1=0.8,λ2,3=0.4(−1±√3).因|λ3|=0.4(1+√3)1,故用Jacobi迭代法不收敛.2.4提示:Bs=100110221−10−2200−1000=100−1100−210−2200−1000=0−2202−3002.谱半径ρ(Bs)=max|λi|=21,故用Gauss-Seidel迭代法不收敛.2.5提示:因系数矩阵A是严格对角占优的,故Jacobi迭代法,Gauss-Seidel迭代法以及SOR迭代法在0ω2时,都是收敛的.2.6提示:(1)BJ=0−22−10−1−2−20,|λI−BJ|=λ2−21λ122λ=λ3=0,所以λ1=λ2=λ3=0,ρ(BJ)=01,故Jacobi迭代法收敛.(2)Bs=100110221−10−2200−1000=0−2202−3002,ρ(Bs)=21,故Gauss-Seidel迭代法发散.2.7提示:Bs=(D−L)−1U=1200−1210012−1201−100−1000=012−120−12−1200−12,其特征值λ1=0,λ2=λ3=−12,故ρ(Bs)=121,从而Gauss-Seidel迭代收敛.BJ=1201−1−20−2110,|λI−BJ|=λ(λ2+54)=0,λ1=0,λ2,3=±√52i,ρ(BJ)=√521,故Jacobi迭代发散.2.8提示:(1)A=a131a232a,当|a|5时,Jacobi迭代收敛.(2)a0,a2−10,a3−14a+120,⇒a1,a3−14a+120,⇒a1,a(a2−14)+120,所以,当a≥√14时,A对称正定,从而Gauss-Seidel迭代收敛.2.9Jacobi:x(k+1)1=−29x(k)2−29x(k)3+79,x(k+1)2=−25x(k)1−45x(k)3−25,x(k+1)3=−25x(k)1−45x(k)2−25.Gauss-Seidel:x(k+1)1=−29x(k)2−29x(k)3+79,x(k+1)2=−25x(k+1)1−45x(k)3−25,x(k+1)3=−25x(k+1)1−45x(k+1)2−25.SOR迭代(ω=1.32):x(k+1)1=x(k)1+1.32(79−x(k)1−29x(k)2−29x(k)3),x(k+1)2=x(k)2+1.32(−25−25x(k+1)1−x(k)2−45x(k)3),x(k+1)3=x(k)3+1.32(−25−25x(k+1)1−45x(k+1)2−x(k)3).上述三种迭代法都收敛.2.10提示:x(k+1)=(I−θA)x(k)+θb,故迭代矩阵B=I−θA的特征值为1−θλi,其中λi0是A的特征值,故当0θ2λn时,有|1−θλi|1,从而迭代收敛.反之,若迭代收敛,则|1−θλi|1,可得0θ2λn.2.11当|a|1√2时,迭代格式收敛.2.12提示:将原方程组调整为:−8x1+x2+x3=−7x1−5x2+x3=14x1+x2−4x3=−13上述方程组的系数矩阵是严格对角占优的,2故Jacobi迭代,Gauss-Seidel迭代均收敛.2.13提示:ρ(J)=0.91,故迭代法收敛.2.14提示:容易验证A=10.50.50.510.50.50.51是对称正定的,故Gauss-Seidel迭代收敛,但2D−A=1−0.5−0.5−0.51−0.5−0.5−0.51不正定,故Jacobi迭代发散.2.15提示:BJ=00−110013230.特征方程3λ3+λ+2=0,特征值λ1=−0.478,λ2,3=0.374±0.868i,ρ(BJ)=0.9451,故Jacobi迭代收敛.BS=(D−L)−1U=00−100−100−1,因为ρ(BS)=1,故Gauss-Seidel迭代发散.2.16提示:(1)将原方程组的系数矩阵调整为:−221111−4211−5−33,显然为严格对角占优矩阵,故迭代法收敛.(2)将原方程组的系数矩阵调整为上述矩阵后,写出迭代矩阵:BJ=01122122140241133−5330.因为∥BJ∥∞1,故迭代法收敛.第三章3.1(1)x=(0,−1,1)T;(2)x=(1.2,2,−1.4).3.213n3+n2−13n.3.3提示:必要性.设a(i)ii̸=0,i=1,2,···,k,则可进行消去法的k−1步.每步A(m)由A逐次实施(−lijEj+Ei)→(Ei)的运算得到,这些运算不改变相应顺序主子式之值,所以有,∆m=a(1)11a(1)12···a(1)1ma(2)22···a(2)2m......a(m)mm=a(1)11a(2)22···a(m)mm.这样便有∆m̸=0,m=1,2,···,k.充分性.用归纳法.当k=1时显然.设该命题对k−1成立.现设∆1̸=0,···,∆k−1̸=0,∆k̸=0.由归纳假设有a(1)11̸=0,a(k−1)k−1,k−1̸=0,Gauss消去法可以进行k−1步,A约化为A(k)=A(k)11A(k)120A(k)22,其中A(k)11是对角元为a(1)11,···,a(k−1)k−1,k−1的上三角阵,因为A(k)是通过消去法由A逐步得到的,A的k3阶顺序主子式等于A(k)的k阶顺序主子式,即∆k=detA(k)11∗0A(k)kk=a(1)11···a(k−1)k−1,k−1a(k)kk,由∆k̸=0,可推出a(k)kk̸=0.3.4提示:(1)a(2)ij=aij−mi1a1j=aij−ai1a11a1j=aji−a1ia11aj1=a(2)ji,所以A2是对称的.(2)A(2)=a11αT10A2=L1A,L1=1−a21a111.........−an1a110···1,则L1ALT1=a1100A2对称正定.故A2正定.3.5提示:n∑j=2,j̸=i|a(2)ij|=n∑j=2,j̸=i|aij−ai1a11a1j|≤∑j=2,j̸=i|aij|+∑j=2,j̸=i|ai1a11a1j|=n∑j=1,j̸=i|aij|−|ai1|+|ai1a11|n∑j=2,j̸=i|a1j||aii|−|ai1|+|ai1a11|n∑j=2,j̸=i|a1j|=|aii|−|ai1a11|[|a11|−n∑j=2,j̸=i|a1j|]=|aii|−|ai1a11|[|a11|−n∑j=2|a1j|+|a1i|]≤|aii|−|ai1a11||a1i|≤|aii−ai1a11a1i|=|a(2)ii|,这已表明,A2是严格对角占优矩阵.3.6提示:(1)必须A为对称正定矩阵,即a=−1,−1b2.(2)x=(14,12,14)T.3.7提示:(1)因正定矩阵必然非奇异,且其顺序主子式均大于0,则由例3.8可知其必存在LU分解.(2)题设条件满足了例3.8的条件,从而知该矩阵可进行LU分解.3.8例如:A=0110非奇异,但不存在LU分解.3.9提示:若A非奇异且其各阶顺序主子式均非零,则有A=LU1,其中L单位下三角矩阵,U1是上三角矩阵,即U1=d11d12···d1nd22···d2n......dnn=d11d22...dnn1u12···u1n1···u2n......1=DU,从而A=LDU.反之,若A非奇异,且A=LDU=LˆU.设A,L,ˆU的各阶顺序主子阵分别为Ak,Lk,ˆUk(k=1,···,n),显然Ak=LkUk.由LU分解的定义可知,L,ˆU的各阶顺序主子式均不为零,即det(Lk)=1,det(ˆUk)̸=0,从而det(Ak)=det(Lk)det(ˆUk)̸=0,k=1,···,n.即A的各阶顺序主子式均不为0.3.10(1)xn=bn/unn,xk=(bk−n∑i=k+1ukixi)/ukk,k=n−1,···,1;(2)n2+n2;(3)M=L−1,mii=1lii,i=1,2,···,n,mij=−j∑k=i+1likmkjlii,j=i+1,···,n,i=2,···,n.3.11提示:(1)x1=b1/l11,xk=(bk−k−1∑i=1lkixi)/lkk;(2)n2+n2.3.12提示:先证A对称正定,从而A−1对称正定.事实上,由题设有AT=A,A−T=A−1,则(A−1)T=(AT)−1=A−1,故A−1对称.又∀X̸=0,有Y=A−1X̸=0,且XTA−1X=YTATY