Answers for Exercises—Numerical methods using Matlab
Chapter 1
P10 2. Solution (a)
produces an equation
.
Solving it gives the roots
and
.
Since
and
, thus, both
and
are fixed points of
.
(b) –(d) The iterative rule using
is
.
The results for part (b)-(d) with starting value
and
are listed in Table 1.
Table 1
0
1.9000
0.1000
0.0500
0
3.800
0.2000
0.0500
1
1.7950
0.2050
0.1025
1
3.9800
0.0200
0.0050
2
1.5690
0.4310
0.2155
2
3.9998
0.0002
0.0001
3
1.0451
0.9549
0.4775
3
4.0000
0.0000
0.0000
(e) Calculate values of
at
and
.
, and
.
Since
is continuous, there exists a number
such that
for all
.
There also exists a number
such that
for all
.
Therefore,
is an attractive fixed point. The sequence generated by
with starting value
converges to
.
is a repelling fixed point. The sequence generated by
with starting value
does not converge to
.
P11 4. Find the fixed point for
:
gives
.
Find the derivative:
.
Evaluate
and
:
,
.
Both
and
gives
. There is no reason to find the solution(s) using the fixed-point iteration.
P11 6. Proof
P21
4. False position method: Assume that
contains the root. The equation of the secand line through
and
is
. It intersects x-axise at
(Eq. 1.36, p18)
,
;
Since
, then
.
Similarly, we have
,
,
10. Bisection method: Assume that
contains the root. Then
.
(a)
, then
.
Since
, then
.
Similarly, we can obtain
. The results are listed in Table 3.
Table 3
n
an
f(an)
bn
f(bn)
cn
f(cn)
0
3
-0.1425
4
1.1578
3.5
0.3746
1
3
-0.1425
3.5
0.3746
3.25
0.1088
2
3
-0.1425
3.25
0.1088
3.125
-0.0166
3
3.125
-0.0166
3.25
0.1088
3.1875
0.0459
4
3.125
-0.0166
3.1875
0.0459
3.1563
0.0147
5
3.125
-0.0479
3.1563
0.0147
3.1406
-9.4265e-004
The values of tan(x) at midpoints are going to zero while the sequence converges
(b) Since
,
, there exist a root in
.
The results using Bisection method are listed in Table 4.
Table 4
n
an
f(an)
bn
f(bn)
cn
f(cn)
0
1
1.5574
3
-0.1425
2
-2.1850
1
1
1.5574
2
-2.1850
1.5
14.1014
2
1.5
14.1014
2
-2.1850
1.75
-5.5204
3
1.5
14.1014
1.75
-5.5204
1.625
-18.4309
4
1.5
14.1014
1.625
-18.4309
1.5625
120.5325
5
1.5625
120.5325
1.625
-18.4309
1.5938
-43.5584
Although the sequence converges, the values of tan (x) at midpoints are not going to zero.
P36 2.
has two zeros
. (
)
The first derivative of
is
.
The Newton-Raphson iterative function is
.
The Newton-Raphson formula is
,
.
The results are listed in Table 5 with starting value p0=1.6 and p0=0.0 respectively.
Table 5
p0
p1
p2
p3
p4
1.6
2.5273
2.3152
2.3028
2.3028
0.0
-3.0000
-1.9615
-1.1472
-0.0066
Obviously, the sequence generated by the starting value p0=0.0 does not converge.
11. Use Newton-raphson method to solve
.
The derivative of
is
.
.
Newton-Raphoson formula is
,
.
Since
is a zero of
and
,
The sequence generated by the recursive formula
will converge to
for any starting value
, where
.
·Answers for Exercises—Numerical methods using Matlab
Chapter 2
P44 2. Solution The 4th equation yields
.
Substituting
to the 3rd equation gives
.
Substituting both
and
to the 2nd equation produces
.
is obtained by sustituting all
,
and
to the 1st equation.
The value of the determinant of the coefficient matrix is
.
4. Proof (a) Calculating the product of the two given upper-triangular matrices gives
.
It is also an upper-triangular matrix.
(b) Let
and
where
and
when
.
Let
. According to the definition of product of the two matrices, we have
for all
.
when
because
and
when
.
That means that the product of the two upper-triangular matrices is also upper triangular.
Solution From the first equation we have
.
Substituting
to the second equation gives
.
is obtained from the third equation and
is attained from the last equation.
The value of the determinant of the coefficient is
7. Proof The formula of the back substitution for an
upper-triangular system is
and
for
.
The process requires
divisions,
multiplications, and
additions or subtractions.
P53 1. Solution Using elementary transformations for the augmented matrix gives
That means that
is equivalent to
The set of solutions is
Solution Using the algorithm of Gaussian Elimination gives
EMBED Equation.3
The set of solutions of the system is obtained by the back substitutions
and
(Chasing method for solving tridiagonal linear systems)
14. (a) (i) Solution Applying Gaussian elimination with partial pivoting to the augment matrix results in
The set of solutions is
and
15. Solution The
Hilbert matrix is defined by
where
for
.
The inverse of the
Hilbert matrix is
The exact solution is
.
The solution is
.
>>1 H is ill-conditioned.
A miss is as good as a mile. (失之毫厘,谬以千里)
P62 5 (a) Solving
gives
.
From
we have
.
The product of
and
is
.
That means
(b) Similarly to the part (a), we have
,
, and
.
6.
,
P72 7. (a) Jacobi Iterative formula is
for
Results for
’,
are listed in Table 2.1 with starting value
.
Table 2.1
0
(0, 0, 0)’
1
(-8.0000, 13.0000, 0.3333)’
2
(57.3333, 45.3333, -4.5000)’
3
(214.1667, -220.8333, 11.8889)’
The numerical results show that Jacobi iteration does not converge.
(b) Gauss-Seidel Iterative formula is
for
Results
’,
are listed in Table 2.2
with starting value
’
Table 2.2
0
(0, 0, 0)’
1
(-8, 45, -10)’
2
(207, -825, 207)’
3
(-3929, 15934, -3965)’
Gauss-Seidel iteration does not converge as well.
Reasons:
Conside the eigenvalues of iterative matrices
Split the coefficient matrix
into three matrices
.
The iterative matrix of Jacobi iteration is
The spectral raduis of
is
.
’
So Jacobi method doesnot converge.
Similarly, the iterative matrix of Gauss-Seidel iteration is
.
The spectral radius of
is
>1.
’
So Gauss-Seidel method does not converge.
8. (a) Jacobi Iterative formula is
for
’ for
are listed in Table 2.3 with starting value
.
Table 2.3
k
0
0
0
0
1
3.2500
1.6000
0.3333
2
2.9333
2.1833
1.1500
3
2.9917
1.9567
0.9472
4
2.9976
2.0089
1.0044
5
2.9989
1.9986
0.9977
6
2.9998
2.0002
0.9999
7
2.9999
2.0000
0.9999
8
3.0000
2.0000
1.0000
9
3.0000
2.0000
1.0000
Jacobi iteration converges to the solution (3, 2, 1)’
Gauss-Seidel iterative formula is
for
’ for
are listed in Table 2.4 with starting value
Table 2.4
k
0
0
0
0
1
3.2500
2.2500
1.0417
2
2.9479
1.9813
0.9858
3
3.0011
2.0031
0.9999
4
2.9992
1.9999
0.9998
5
3.0000
2.0000
1.0000
6
3.0000
2.0000
1.0000
7
3.0000
2.0000
1.0000
8
3.0000
2.0000
1.0000
9
3.0000
2.0000
1.0000
Gauss-Seidel iteration converges to the solution (3, 2, 1)’
Answers for Exercises—Numerical methods using Matlab
Chapter 3
P99 1. Solution (a) The nth order derivative of
is
.
Therefore,
,
and
.
Estimating the remainder term gives
for
.
Substituting
to
gives
and
.
By using Taylor polynomial we have
P108 1. (a) Using the Horner’s method to find
gives
4
-0.02
0.1
-0.2
1.66
-0.08
0.08
-0.48
-0.02
0.02
-0.12
1.18
So
=1.18.
From part (a) we have
.
can be also obtained by using Horner’s method.
4
-0.02
0.02
-0.12
-0.08
-0.24
-0.02
-0.06
-0.36
So
=-0.36
Another method:
4
-0.02*3
0.1*2
-0.2
-0.24
-0.16
-0.06
-0.04
-0.36
Hence, P(4)=-0.36.
Find
and
firstly.
4
-0.02/4
0.1/3
-0.2/2
1.66
0
-0.02
0.0532
-0.1872
5.8912
-0.005
0.0133
-0.0468
1.4728
5.8912
1
-0.02/4
0.1/3
-0.2/2
1.66
0
-0.005
0.0283
-0.0717
1.5883
-0.005
0.0283
-0.0717
1.5883
1.5883
Then
4.3029.
(d) Use Horner’s method to evaluate P(5.5)
5.5
-0.02
0.1
-0.2
1.66
-0.1100
-0.0550
-1.4025
-0.02
-0.0100
-0.2550
0.2575
Hence, P(5.5)=0.2575.
Let
. There are 4 coefficients needed to found.
Substituting four known point
, i=1, 2, 3, 4, into
gives four linear equations with unknown
, i=1, 2, 3, 4.
The coefficients can be found by solving this linear system:
P120 1. The values of f(x) at the given points are listed in Table 3.1:
Table 3.1
x
-1
0
1
2
f(x)
-1
0
1
8
(a) Find the Lagrange coefficient polynomials
EMBED Equation.3
The interpolating polynomial is
.
(b)
EMBED Equation.3
.
(c)
(d)
EMBED Equation.3
.
(e)
EMBED Equation.3
7. (a) Note that each Lagrange polynomial
is of degree at most 2 and
is a combination of
. Hence
is also a polynomial of degree at most 2.
(b) For each
,
, the Lagrange coefficient polynomial
, and
for
,
. Therefore,
.
(c)
is a polynomial of degree
and has
zeroes. According to the fundamental theorem of algebra,
for all x.
9. Let
.
is a polynomial of degree
.
is degree with
at N+1 points
implies that
has N+1 zeroes.
Therefore,
for all x, that is,
for all x.
P131 6. (a) Find the divided-difference table:
k
xk
f[ ]
f[,]
f[, ,]
f[, , ,]
f[, , , ,]
0
1.0
3.60
1
2.0
1.80
-1.80
2
3.0
1.20
-0.6
0.6
3
4.0
0.90
-0.3
0.15
-0.15
4
5.0
0.72
-0.18
0.06
-0.03
0.03
(b) Find the Newton polynomials with order 1, 2, 3 and 4.
,
,
,
.
(c)–(d) The results are listed in Table 3.2
Table 3.2
xk
f(xk)
P1 (xk)
|P1 (xk)- f(xk)|
P2 (xk)
|P2 (xk)- f(xk)|
P3 (xk)
|P3 (xk)- f(xk)|
P4 (xk)
|P4 (xk)- f(xk)|
2.5
1.4400
0.9000
0.5400
1.3500
0.0900
1.4062
0.0338
1.3444
0.0956
3.5
1.0286
-0.9000
1.9286
1.3500
0.3214
1.0688
0.0402
1.3219
0.2933
P143 6.
,
.
The derivative of
is
.
yields
.
Evaluating
at
and
gives
,
,
and
.
Therefore,
,
.
10. When
, the Chebyshev nodes are
and
.
Calculating the Lagrange coefficient polynomials based on
can produce the following results:
The proof is finished.
Answers for Exercises—Numerical methods using Matlab
Chapter 4
P157 1(a). Solution The sums for obtaining Normal equations are listed in Table 4.1
Table 4.1
-2
1
1.2
4
-2
0.04
-1
2
1.9
1
-2
0.01
0
3
2.6
0
0
0.16
1
3
3.3
1
3
0.09
2
4
4.0
4
8
0
0
13
10
7
0.3
The normal equations are
. Then
.
The least-squares line is
.
P158 4. Proof Suppose the linear-squares line is
where A and B satisfies
the Normal equations
and
.
meas that
the point
lies on the linear-squares line
.
5. First eliminating B on the Normal equations
and
gives
where
.
Substituting A into the first equation gets
.
Note that
.
Simplifying B gives
.
8(b). The sums needed in the Normal equations are listed in Table 4.2
2.0
5.9
4.0
16.0
64
23.6
47.2
2.3
8.3
5.29
27.9841
148
43.907
100.9861
2.6
10.7
6.76
45.6976
308.9
72.332
188.0632
2.9
13.7
8.41
70.7281
594.8
115.217
334.1293
3.2
17.0
10.24
104.8576
1073.7
174.08
557.056
13
55.6
34.7
265.3
2189.5
429.136
1227.4
Hence,
and
.
,
.
fits the given data better.
P171 2(c). The sums for normal equations are listed in Table 4.3.
-2
10
4
-8
16
-20
40
-1
1
1
-1
1
-1
1
0
0
0
0
0
0
0
1
2
1
1
1
2
2
2
9
4
8
16
18
36
0
22
10
0
34
-1
79
Using the formula
produces the system with unkowns A, B, and C
Solving the obove system gives
The fitting curve is
P172 4. (a) Translate points in x-y plane into X-Y plane using
. The results are listed in Table 4.4.
Table 4.4
-1
6.62
-1
1.8901
1
-1.8901
0
3.94
0
1.3712
0
0
1
2.17
1
0.7747
1
0.7747
2
1.35
2
0.3001
4
0.6002
3
0.89
3
-0.1165
9
-0.3496
5
4.2196
15
-0.8648
The Normal equations
give the system
Then
,
. Thus
.
The fitting curve is
, and
.
(b) Translate points in x-y plane into X-Y plane using
. The results are listed in Table 4.5.
Table 4.5
-1
6.62
-1
0.1511
1
-1.8901
0
3.94
0
0.2538
0
0
1
2.17
1
0.4608
1
0.7747
2
1.35
2
0.7407
4
0.6002
3
0.89
3
1.1236
9
-0.3496
5
2.7300
15
5.1620
The Normal equations
give the system
Then
,
.
The fitting curve is
and
.
(c) It is easy to see that the exponential function is better comparing with errors in part (a) and part (b).
P188 1. (a) Derivativing
gives
. Substituting the conditions into the derivative pruduces the system of equations
(b) Solving the linear system of equations in (a) gives
.
The cubic polynomial is
.
Figure: Graph of the cubic polynomial
4. Step 1 Find the quantities:
,
,
,
Step 2 Use
to obtain the linear system
.
The solutions are
.
Step 3 Compute
and
using clamaped boundary.
,
Step 4 Find the spline coefficients
,
;
,
;
,
;
Step 5 The cubic spline is
for
,
for
, and
for
.
5. Calculate the quantities:
,
,
,
,
,
. ( Same values as Ex. 4)
Substituting
,
and
into
gives
Solve the linear equation to obtain
In addition,
Use formula (4. 65) to find the spline coefficients:
,
;
,
;
,
.
Therefore,
, for
;
, for
for
.
Answers for Exercises—Numerical methods using Matlab
Chapter 5
P209 1(b). Solution Let
The result of using the trapezoidal rule with h=1 is
Using Simpson’s rule with h=1/2, we have
For Simpson’s 3/8 rule with h=1/3, we obtain
The result of using the Boole’s rule with h=1/4 is
4. Proof Integrate
over
.
=
.
The Quadrature formula
is called the trapezoidal rule.
6. Solution The Simpson’s rule is
.
It will suffice to apply Simpson’s rule over the interval [0, 2] with the test functions
and
. For the first four functions, since
,
,
,
,
the Simpson’s rule is exact. But for
,
.
.
Therefore, the degree of precision of Simpson’s rule is n=3.
The Simpson’s rule and the Simpson’s 3/8 rule have the same degree of precision n=3.
P220 3(a) Solution When
for
,
.
The values of
at 11 sample points (M=10) are listed in the Table 5.1:
Table 5.1
x
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1.0
g(x)
0
0.0010
0.0081
0.0280
0.0710
0.1563
0.3179
0.6098
1.1084
1.9156
3.1623
(i) Using the composite Trapezoidal rule
, the computation is
=
=0.1576+0.4216=0.5792.
(ii) Using the composite Simposon’s rule
, the computation is
=
=0.5672.
7. (a) Because the formula
is exact for the three functions
,
, and
, we obtain three equations with unkowns
,
, and
:
,
,
.
Solving this linear system gives
,
and
.
Thus,
Let
and denote
EMBED Equation.3
Then the change of variable
translates
into [0, 2] and
converts the integral expresion
into
. Hence,
.
The formula
is known as the Simpson’s rule over
.
8(a).
9(a).
P234 1(a) Let
. The Romberg table with three rows for
is given as follows:
J
Trapezoidal Rule
Simpson’s Rule
Boole’s
Rule
0
-0.04191
1
0.04418
0.07288
2
0.3800
0.4919
0.5198
Where
,
,
,
,
,
,
2. Proof If
, then
and
.
9. (a) Let
.
implies
. Thus
.
(b) Let
.
implies
. Thus
.
10. (a) Do variable translation
. Then
.
That means the two integrals
and
have the same numerical value.
(b) Let
and
.
Use
means that the truncation error is
approximately.
Note that
. It means
.
But for
,
is not true for all
and any integer
.
Thus the Romberg sequence is faster for
than for
even though they have the same numerical value.
P242 1 (a) Applying the change of variable
to
gives
.
Thus the two integrals are
and
equivalent.
(b)
=0.0809 +58.5857=58.6667
If using
to approximate the integral, The result is
6. Analysis: The fact that the degree of precision of N-point Gauss-Legendra integration is 2N-1 implies that the error term can be represented in the form
.
(a) Since
, and
implies
. Thus =
.
(b)
and
implies
.
Thus
=
.
7. The nth Legendre polynomial is defined by
The first five polynomials are
The roots of them are same as ones in Table 5.8.
11. The conditions that the relation is exact for the functions means the three equations:
Sloving the system gives
.
is called three-point Gauss-Legendre rule.
Answers for Exercises—Numerical methods using Matlab
Chapter 6
P249 1. (a) Proof Differentiate
.
Substitute
and
into the right-hand side of the equation
.
(b) Solution Let
. Then
for any
.
So, the Lipschitz constant is
.
12 . Integrate both side of
over [a, b]:
.
Then,
, where
is the solution of the I. V. P
, for
with
. That means that the definite integral
can be computed using the two values
and
of the solution
of the given I. V. P..
14. Solution Separate the two variables of the equation
into the form
.
Integrate
and yeild the general solution
.
The initial-value condition
means that
.
The solution for the I. V. P. is
.
P257 3. (a)-(c) The formula using Euler’s method to solve the I. V. P.
,
can be represented in the form
. When
and
, the results are listed in Table 6.1. Table 6.1
h=0.1
h=0.2
h=0.1
h=0.2
0
1
1
1
0
0.1
1.0000
0.9950
0.0050
0.2
0.9850
1.0000
0.9802
0.0048
0.0198
0.3
0.9606
0.9560
0.0046
0.4
0.9273
0.9408
0.9231
0.0042
0.0177
(d) The F. G. E. does decrease half approximatelly as expacted when h is halved.
6. When
,
and
, the Euler’s formula for
is in the form
. With
, the missing entries can be filled in the table.
Year
1900
0.0
76.1
76.1
1910
10.0
92.4
89.0
1920
20.0
106.5
103.6
1930
30.0
123.1
120.1
1940
40.0
132.6
138.2
1950
50.0
152.3
158.3
1960
60.0
180.7
180.0
1970
70.0
204.9
202.8
1980
80.0
226.5
227.1
7. Proof Using Euler’s method to calculate
gives
=
=… …=
=
P265 3(a) Solution Heun’s scheme for
is in the form
,
.
With
and
, the results are listed in Table 6.2.
Table 6.2
k
h=0.1
h=0.2
h=0.1
h=0.2
0
0
1.0000
1.0000
1
0
0
1
0.1
0.9950
0.9950
0.0000
2
0.2
0.9802
0.9800
0.9802
0.0000
0.0002
3
0.3
0.9560
0.9560
0.0000
4
0.4
0.9231
0.9228
0.9231
0.0000
0.0003
(b)
when
and
when
.
(c) The F. G. E is reduced aproximatelly by a factor of
when
is halved.
6. Note that
in the given I. V. P.
Then Heun formula can be represented in the following form:
Therefore,
=… …
=
7. The missing entries can be filled using
.
1
1.732422
1/2
1.682121
1.665354
1/4
1.672269
1.668985
1/8
1.670076
1.669345
1/16
1.669558
1.669385
1/32
1.6694
本文档为【《数值分析》黄仿伦改编英文版课后习题答案】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑,
图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。