10.4 Applications of Numerical Methods Applications of Gaussian Elimination With Pivoting
10.4 Applications of Numerical Methods Applications of Gaussian Elimination With Pivoting
C 25. (a) Compute the eigenvalues of C In Exercises 27 and 28, apply four iterations of the power method
(with scaling) to approximate the dominant eigenvalue of the given
matrix. After each iteration, scale the approximation by dividing by
3 4 3 4
2 1 2 3
A5 and B 5 . its length so that the resulting approximation will be a unit vector.
1 2 1 4
24
3 4
25. (b) Apply four iterations of the power method with scaling to 7 2
3 4
5 6
each matrix in part (a), starting with x0 5 s21, 2d. 27. A 5 28. A 5 16 29 6
4 3
25. (c) Compute the ratios l2yl1 for A and B. For which do you 8 24 5
expect faster convergence?
26. Use the proof of Theorem 10.3 to show that
AsAkx 0d < l1sAkx 0d
for large values of k. That is, show that the scale factors
obtained in the power method approach the dominant eigen-
value.
Regression Analysis The least squares regression polynomial of degree m for the points {(x1, y1), (x2, y2),
. . . , (xn, yn)} is given by
for Polynomials
y 5 amxm 1 am21xm21 1 . . . 1 a2x2 1 a1x 1 a0,
where the coefficients are determined by the following system of m 1 1 linear equa-
tions.
na0 1 sS xida1 1
sS xi2da2 1 . . . 1 sS ximdam 5 S yi
sS xida0 1 sS xi2da1 1 sS xi3da2 1 . . . 1 sS xim11dam 5 S xiyi
sS xi2da0 1 sS xi3da1 1 sS xi4da2 1 .. . . 1 sS xim12dam 5 S xi2yi
.
.
.
sS xi da0 1 sS xi da1 1 sS xi da2 1 . . . 1 sS xi dam 5 S ximyi
m m11 m12 2m
The world population in billions for the years between 1950 and 1985, as given by the
Statistical Abstract of the United States, is shown in the following table.
Find the second-degree least squares regression polynomial for these data and use the re-
sulting model to predict the world population for 1990 and 1995.
Solution We begin by letting x 5 24 represent 1950, x 5 23 represent 1955, and so on. Thus the
collection of points is given by {(24, 2.53), (23, 2.77), (22, 3.05), (21, 3.36), (0, 3.72),
(1, 4.10), (2, 4.47), (3, 4.87)}, which yields
8 8 8
n 5 8, o
i51
xi 5 24, o
i51
xi2 5 44, ox
i51
i
3
5 264,
8 8 8 8
o
i51
xi4 5 452, o
i51
yi 5 28.87, o
i51
xi yi 5 20.24, o x y 5 146.78.
i51
2
i i
Therefore the system of linear equations giving the coefficients of the quadratic model
y 5 a2x2 1 a1x 1 a0 is
8 24 44 28.87
3 24 44 264 20.24
44 264 452 146.78
4
560 CHAPTER 10 NUMERICAL METHODS
produces
1 21.4545 10.2727 3.3359
becomes
3 4
7 21 91 441 14
21 91 441 2,275 52
91 441 2,275 12,201 242
441 2,275 12,201 67,171 1,258
produces
3 4
1.0000 5.1587 27.6667 152.3150 2.8526
0.0000 1.0000 8.5312 58.3482 0.6183
,
Figure 10.2 0.0000 0.0000 1.0000 9.7714 0.1286
y 0.0000 0.0000 0.0000 1.0000 0.1667
(6, 4)
4 which implies that
(2, 3) (5, 2)
3
(3, 2) a3 5 0.1667, a2 5 21.5000, a1 5 3.6905, a0 5 20.0714.
2
(1, 2) Therefore the cubic model is
1
(0, 0) (4, 1) y 5 0.1667x3 2 1.5000x2 1 3.6905x 2 0.0714.
x
1 2 3 4 5 6 Figure 10.2 compares this model with the given points.
Solution We let the probability of winning (getting food) by starting at the ith intersection be repre-
sented by pi. Then we form a linear equation involving pi and the probabilities associated
Figure 10.3
with the intersections bordering the ith intersection. For instance, at the first intersection the
mouse has a probability of 41 of choosing the upper right path and losing, a probability of 41
of choosing the upper left path and losing, a probability of 41 of choosing the lower right
1
path (at which point it has a probability of p3 of winning), and a probability of 14 of choos-
2 3 ing the lower left path (at which point it has a probability of p2 of winning). Thus we have
4 5 6 p1 5 14 s0d 1 14 s0d 1 14 p2 1 14 p3.
{
{
{
{
7 8 9 10
Upper Upper Lower Lower
right left left right
Food
562 CHAPTER 10 NUMERICAL METHODS
Using similar reasoning, we find the other nine probabilities to be represented by the fol-
lowing equations.
p2 5 15 s0d 1 15 p1d 1 15 p3 1 15 p4 1 15 p5
p3 5 15 s0d 1 15 p1d 1 15 p2 1 15 p5 1 15 p6
p4 5 15 s0d 1 15 p2d 1 15 p5 1 15 p7 1 15 p8
p5 5 16 p2d 1 16 p3d 1 16 p4 1 16 p6 1 16 p81 1 16 p9
p6 5 15 s0d 1 15 p3d 1 15 p5 1 15 p9 1 15 p10
p7 5 14 s0d 1 14 s1d 1 14 p4 1 14 p8
p8 5 15 s1d 1 15 p4d 1 15 p5 1 15 p7 1 15 p9
p9 5 15 s1d 1 15 p5d 1 15 p6 1 15 p8 1 15 p10
p10 5 14 s0d 1 14 s1d 1 14 p6 1 14 p9
Rewriting these equations in standard form produces the following system of ten linear
equations in ten variables.
4p1 2 5p2 2 5p3 2 5p4 2 6p5 2 5p6 2 4p7 2 5p8 2 5p9 2 4p10 5 0
2p1 1 5p2 2 5p3 2 5p4 2 6p5 2 5p6 2 5p7 2 5p8 2 5p9 2 4p10 5 0
2p1 2 5p2 1 5p3 2 5p4 2 5p5 2 5p6 2 5p7 2 5p8 2 5p9 2 5p10 5 0
4p1 22p2 1 5p3 1 5p4 2 5p5 2 5p6 2 5p7 2 5p8 2 5p9 2 5p10 5 0
4p1 22p2 2 5p3 2 5p4 1 6p5 2 6p6 2 5p7 2 5p8 2 5p9 2 5p10 5 0
4p1 2 4p2 22p3 2 4p4 2 5p5 1 5p6 2 5p7 2 5p8 2 5p9 2 5p10 5 0
4p1 2 5p2 2 5p3 22p4 2 6p5 2 5p6 1 4p7 2 5p8 2 5p9 2 4p10 5 1
4p1 2 5p2 2 5p3 22p4 2 6p5 2 5p6 2 4p7 1 5p8 2 5p9 2 4p10 5 1
4p1 2 5p2 2 5p3 2 2p4 22p5 2 5p6 2 4p7 2 5p8 1 5p9 2 4p10 5 1
4p1 2 5p2 2 5p3 2 2p4 2 2p5 22p6 2 4p7 2 5p8 2 5p9 1 4p10 5 1
4 21 21 0 0 0 0 0 0 0 0
21 5 21 21 21 0 0 0 0 0 0
21 21 5 0 21 21 0 0 0 0 0
0 21 0 5 21 0 21 21 0 0 0
0 21 21 21 6 21 0 21 21 0 0 .
0 0 21 0 21 5 0 0 21 21 0
0 0 0 21 0 0 4 21 0 0 1
0 0 0 21 21 0 21 5 21 0 1
0 0 0 0 21 21 0 21 5 21 1
0 0 0 0 0 21 0 0 21 4 1
SECTION 10.4 APPLICATIONS OF NUMERICAL METHODS 563
{
(n 2 l)L
30, n2, 3n, n 2, . . . , 3 4
L L 2L
,L
n
The number of population members in each age class is then represented by the age distri-
bution vector
34
x1 Number in first age class
x Number in second age class
x 5 .2 .
..
xn Number in nth age class
Over a period of Lyn years, the probability that a member of the ith age class will survive
to become a member of the si 1 1dth age class is given by pi, where 0 # pi # 1, i 5 1, 2,
. . . , n 2 1. The average number of offspring produced by a member of the ith age class
is given by bi, where 0 # bi, i 5 1, 2, . . . , n. These numbers can be written in matrix form:
b1 b2 b3 . . . bn21 bn
p1 0 0 ... 0 0
A 5 0 p2 0 ... 0 0
.. .. .. .. ..
. . . . .
0 0 0 . . . pn21 0
564 CHAPTER 10 NUMERICAL METHODS
Multiplying this age transition matrix by the age distribution vector for a given period of
time produces the age distribution vector for the next period of time. That is,
Axi 5 xi11.
In Section 7.4 we saw that the growth pattern for a population is stable if the same per-
centage of the total population is in each age class each year. That is,
Axi 5 xi11 5 lxi.
For populations with many age classes, the solution to this eigenvalue problem can be
found with the power method, as illustrated in Example 4.
To apply the power method with scaling to find an eigenvector for this matrix, we use an
initial approximation of x05(1, 1, 1, 1, 1, 1, 1, 1, 1, 1). The following is an approximation
for an eigenvector of A, with the percentage of each age in the total population.
Percentage in
Eigenvector Age Class Age Class
This means that the population in Example 4 increases by 6.5% every ten years.
REMARK: Should you try duplicating the results of Example 4, you would notice that
the convergence of the power method for this problem is very slow. The reason is that the
dominant eigenvalue of l ø 1.065 is only slightly larger in absolute value than the next
largest eigenvalue.
566 CHAPTER 10 NUMERICAL METHODS
Time (in minutes) 310 200 100 60 50 Medicare 7.5 8.4 10.3 13.2
Depth (in feet) 80 90 100 110 Year 1978 1980 1982 1984
C 15. Find the least squares regression line for the population data C 19. A square metal plate has a constant temperature on each of its
given in Example 1. Then use the model to predict the world four boundaries, as shown in Figure 10.6. Use a 4 3 4 grid to
population in 1990 and 1995, and compare the results with approximate the temperature distribution in the interior of the
the predictions obtained in Example 1. plate. Assume that the temperature at each interior point is the
16. Show that the formula for the least squares regression line average of the temperatures at the four closest neighboring
presented in Section 2.5 is equivalent to the formula presented points.
in this section. That is, if Figure 10.6
34 3 4
y1 1 x1 100°
3 4
y 1 x2 a
Y 5 .2 , X 5 .. , A5 0 ,
.. . ... a1 1 2 3
yn 1 xn
100° 4 5 6 0°
then the matrix equation A 5 sXTXd21XTY is equivalent to
nS xiyi 2 (S xi)(S yi) S yi Sx 7 8 9
a1 5 and a0 5 2 a1 i.
nS xi2 2 (S xi)2 n n
0°
Applications of the Gauss-Seidel Method
C 17. Suppose that the experiment in Example 3 is performed with
C 20. A rectangular metal plate has a constant temperature on each
the maze shown in Figure 10.4. Find the probability that the
mouse will emerge in the food corridor when it begins in the of its four boundaries, as shown in Figure 10.7. Use a 4 3 5
ith intersection. grid to approximate the temperature distribution in the interior
Figure 10.4 of the plate. Assume that the temperature at each interior point
is the average of the temperatures at the four closest neighbor-
ing points.
Figure 10.7
1 2 3 120°
1 2 3 4
4 5 6
80° 5 6 7 8 40°
Food 9 10 11 12
3 4 3 4
0 1 2 1 2 2
C 23. A 5 1
0 0 C 24. A 5 1
0 0
2 3
7 8 9 0 1
0 0 1
0
4 3
Food
568 CHAPTER 10 NUMERICAL METHODS
C 25. In Example 1 of Section 7.4, a laboratory population of rab- 28. In Example 2 of Section 2.5, the stochastic matrix
bits is described. The age transition matrix for the population is
3 4
0.70 0.15 0.15
3 4
0 6 8 P 5 0.20 0.80 0.15
A 5 0.5 0 0 . 0.10 0.05 0.70
0 0.5 0
represents the transition probabilities for a consumer prefer-
Find a stable age distribution for this population. ence model. Use the power method to approximate a domi-
C 26. A population has the following characteristics. nant eigenvector for this matrix. How does the approximation
(a) A total of 75% of the population survives its first year. Of relate to the steady-state matrix described in the discussion
that 75%, 25% survives its second year. The maximum following Example 3 in Section 2.5?
life span is three years. C 29. In Exercise 9 of Section 2.5, a population of 10,000 is
(b) The average number of offspring for each member of the divided into nonsmokers, moderate smokers, and heavy
population is 2 the first year, 4 the second year, and 2 the smokers. Use the power method to approximate a dominant
third year. eigenvector for this matrix.
Find a stable age distribution for this population. (See
Exercise 9, Section 7.4.)
27. Apply the power method to the matrix
31 4
1 1
A5
0
discussed in Chapter 7 (Fibonacci sequence). Use the power
method to approximate the dominant eigenvalue of A. (The
dominant eigenvalue is l 5 s1 1 Ï5dy2.)