Professional Documents
Culture Documents
Test
Test
Chapter 3
CO2: Solve system of linear equations using conventional and special properties matrix operations. Use
simplex method to solve linear programming problems.
HONOUR PLEDGE
RECEIVED BY:
SLT: 30
UNIVERSITI TEKNOLOGI PETRONAS
Minutes
FCM2043/FDM2043 COMPUTATIONAL METHODS
CHAPTER 3 GAUSS-SEIDEL SEPTEMBER 2017
ACTIVE LEARNING (PAIR WORK): In Class Work
Name : Student ID:
2. Use the Gauss-Seidel method to solve the following system until the percent relative error
falls below ε s = 8% .
6 x1 + 2 x2 + x3 = 11
2 x1 − 3 x2 + x3 = 1.5
1.2 x1 + 2 x2 − 7 x3 = 5
4x − y + z = 8
2x + 5 y + 2z = 3
x + 2 y + 4 z = 11
Open
40 Minutes Tour
Open
If [xNS ] is a computed approximate numerical
soloution of a system of n equations
[A][x] = [b]
and [xTS ] is the true (exact) solution, then the
error is the vector:
[e] = [xTS ] − [xNS ]
The true error, however, cannot be calculated
because the true solution is not known.
Open
An alternative measure of the
accuracy of a solution is the residual
which is defined by
[r ] = [a][xTS ] − [a ][xNS ] = b − [a ][xNS ] = [a][e]
Open
The 2-norm of a matrix is given by
[a ][v ]
[a ] 2 = max
[v ]
where [v] is an eigenvector of the
matrix[a] corresponding to the
eigenvalue λ
Open
Condition Number
If the inverse matrix exist,
then it is defined by
−1
Cond [a ] = [a ] ∞ [a ]
∞
Open
Example. Consider the
following systems of equations:
9 x 1 − 2 x 2 + 3 x 3 + 2 x 4 = 54 . 5
2 x 1 + 8 x 2 − 2 x 3 + 3 x 4 = − 14
− 3 x 1 + 2 x 2 + 11 x 3 − 4 x 4 = 12 . 5
− 2 x 1 + 3 x 2 + 2 x 3 + 10 x 4 = − 21
x1 = 4 . 98805 , x 2 = − 1 . 99511 ,
x 3 = 2 . 49806 , and x 4 = − 1 . 00347 .
Open
(a) Determine the true error, [e]
and the residual [r ]
(b) Determine the infinity norms
of the true solution [xTS ] , the error
[e] , the residual [r ] and the vector [b]
(c) Find the condition number for
matrix [a]
Open
Solution
Firstly we write in matrix
form:
9 −2 3 2 x1 54 . 5
2 8 −2
3 x2 − 14
=
− 3 2 11 − 4 x3 12 . 5
− 2 3 2 10 x 4 − 21
Open
The true solution is 5
− 2
x TS =
2 .5
−1
the approximate solution is
4 . 98805
− 1 . 99511
x NS =
2 . 49806
− 1 . 00347
Open
0.0119
− 0.0049
The error [e] =
0.0019
0.0035
the residual
0.13009
− 0.00869
[r ] =
− 0.03817
0.00001
Open
(b) [xTS ] ∞ = max[5 , − 2 , 2.5 , − 1 ] = 5
[e] ∞ = 0.0119
[r ] ∞ = 0.13009
[b] ∞ = 54.5
(c)
0.0910 0.0386 − 0.0116 − 0.0344
− 0.0206 0.1194 0.0308
− 0.0194
[a] =
−1
−1
Cond [a ] = [a ] ∞ [a ] = 3.804
∞
Open
Ill-Conditioned Systems
Open
Exercise. Given the system
1 . 02 x 1 + 0 . 98 x 2 = 2
0 . 98 x 1 + 1 . 02 x 2 = 2
has true solution x 1 = x 2 = 1
Calculate the error and the residual
for the following two approximate
solutions:
(a) x 1 = 1 . 02 , x 2 = 1 . 02
(b) x 1 = 2 , x 2 = 0
Verify the statement: A small
residual does not necessarily
guarantee a small error.
Open