Graphics Programs Reference
In-Depth Information
Solution With the givendata, the iteration formulas in Eq. (2.34) become
1
4
x 1 =
(12
+
x 2
x 3 )
1
4
x 2 =
(
1
+
x 1 +
2 x 3 )
1
4
x 3 =
(5
x 1 +
2 x 2 )
Choosing the starting values x 1 =
x 2 =
x 3 =
0, wehavefor the first iteration
1
4
x 1 =
(12
+
0
0)
=
3
1
4
x 2 =
[
1
+
3
+
2(0)]
=
0
.
5
1
4
x 3 =
[5
3
+
2(0
.
5)]
=
0
.
75
The second iterationyields
1
4
x 1 =
(12
+
0
.
5
0
.
75)
=
2
.
9375
1
4
x 2 =
[
1
+
2
.
9375
+
2(0
.
75)]
=
0
.
859 38
1
4
x 3 =
[5
2
.
9375
+
2(0
.
85938)]
=
0
.
94531
and the third iterationresults in
1
4
x 1 =
(12
+
0
.
85938
0
.
94531)
=
2
.
978 52
1
4
x 2 =
[
1
+
2
.
97852
+
2(0
.
94531)]
=
0
.
967 29
1
4
x 3 =
[5
2
.
97852
+
2(0
.
96729)]
=
0
.
989 02
Afterfive more iterations the results would agree with the exact solution x 1 =
3,
x 2 =
x 3 =
1within five decimal places.
EXAMPLE 2.16
Solve the equations in Example 2.15 by the conjugate gradient method.
Solution The conjugate gradient method should converge after three iterations.
Choosing again for the starting vector
000 T
x 0 =
Search WWH ::




Custom Search