You are on page 1of 3

Cairo University Faculty of Engineering

Main-Stream Spring 2023


MTH 2134 Numerical Analysis

Assignment 5
Solution of linear system of equations

1. Use Gauss-Seidel method to find an approximate solution for the following


linear system of equations
0 . 4 x + 5 y − 0 .8 z = 3
0 . 6 x + y − 8 z = 2 .4
4 x + 0 .1 y + 0 .2 z = 1 .8

Start by zero initial conditions and stop after two iterations. Find your error.

2. Use Gauss-Seidel method to find approximate solution for the following linear
system of equations:
 4 1 − 1  x   8 
    
 − 1 2 5   y  =  5
 2 5 − 1  z   8 
    
Start by (1.8 0.95 0.93) and stop after two iterations, then find your relative
T

approximate error.

3. Use SOR method with  = 1.3 to solve the following linear system of equations:
 10 1 − 2   x1   7 
    
 1 1 − 10   x 2  =  − 10 
− 2 5 − 1   x3   − 8 

Start with (0.95 − 0.8 0.9) and stop after two iterations, then find your relative
T

error. (Put your results in a table)

 7 1 2  x   6 
    
4. a) Use Gauss Seidel method to solve  − 1 2 5  y  =  − 4 
 2 10 3  z   9 
    
Start with X = (0.95 0.9 − 0.9) and stop after two iterations, then find the
(0) T

relative
error for your solution.

b) Use SOR method with  = 1.4 to solve the linear system of equations at (a) .
= (0.95 0.9 − 0.9) and stop after two iterations . If the exact
(0) T
Start with X
solution is equal (1 1 − 1)T , find the true error for (a) and (b).

5. Use the Successive Over Relaxation (SOR) technique to find the solution of the
linear system of equations given below with the initial condition vector
[𝟏. 𝟖 −𝟎. 𝟗 𝟏. 𝟏]𝑻
(𝝎 = 𝟏. 𝟐). Stop after 2 iterations.
𝟏 𝟒 𝟐 𝒙 𝟎
[𝟓 𝟏 −𝟏 ] [𝒚 ] = [ 𝟖]
𝟐 −𝟏 𝟏𝟎 𝒛 𝟏𝟓
6. Use Successive over relaxation technique to find the solution of the linear system of
equations given below with the initial condition vector: [𝟏. 𝟖 −𝟏. 𝟗 𝟑. 𝟐]𝑻 and
𝝎 = 𝟏. 𝟏. Stop after 2 iterations. Evaluate the percentage of approximate error.
𝟐 𝟒 𝟏𝟏 𝒙 𝟐𝟗
[𝟐 𝟕 𝒚
−𝟒] [ ] = [−𝟐𝟐]
𝟔 𝟎 𝟓 𝒛 𝟐𝟕
7. Use Gauss-Seidel to find the solution of the linear system of equations given below
with the initial condition vector [−𝟎. 𝟑 𝟎. 𝟑 𝟑. 𝟑]𝑻 . Stop after 2 iterations.
𝟑 𝟑 −𝟏𝟏 𝒙𝟏 −𝟑𝟑
[𝟑 𝟔 −𝟐 ] [ 𝒙 𝟐 ] = [ 𝟒 ]
𝟒 −𝟐 𝟏 𝒙𝟑 𝟎. 𝟔
Calculate the percentage of relative approximate error in the last iteration.

8. Use Gauss-Seidel to find the solution of the linear system of equations given below
with the initial condition vector [𝟎. 𝟏 −𝟎. 𝟐 𝟐. 𝟐]𝑻 . Stop after 2 iterations.
𝟐𝒙 − 𝟐𝒚 + 𝟔𝒛 = 𝟏𝟑
𝟖𝒙 + 𝟒𝒚 + 𝟐𝒛 = 𝟐. 𝟒
𝒙 − 𝟗𝒚 − 𝟐𝒛 = 𝟔. 𝟗
9. Use Gauss-Seidel to find the solution of the linear system of equations given below
with the initial condition vector [𝟏. 𝟖 −𝟎. 𝟗 𝟏. 𝟏]𝑻 . Stop after 2 iterations.
𝟒 𝟒 −𝟏𝟏 𝒙 𝟐𝟖
[𝟖 −𝟑 𝟏 ] [𝒚] = [−𝟏]
𝟐 𝟗 −𝟐 𝒛 𝟏𝟒
10. Use Gauss Seidel to find the solution of the linear system of equations
given below with the initial condition vector [−𝟏 𝟐 𝟒]𝑻 . Stop after 2
iterations. Calculate the percentage of approximate error.
𝟎. 𝟐𝒙 − 𝒚 + 𝟐𝒛 = 𝟓. 𝟖𝟔
−𝟒𝒙 + 𝟎. 𝟑𝒚 − 𝟎. 𝟏𝒛 = 𝟓. 𝟎𝟕
𝟎. 𝟏𝒙 − 𝟑 𝒚 − 𝟎. 𝟒𝒛 = −𝟖. 𝟕

11. Use Gauss Seidel to find the solution of the linear system of equations
given below with the initial condition vector [𝟐 𝟎 𝟐]𝑻 . Stop after 2
iterations. Calculate the percentage of approximate error.
𝟐. 𝟒𝒙 − 𝟕𝒚 + 𝒛 = 𝟏𝟔. 𝟏𝟒
𝟏𝟒𝒙 + 𝟑. 𝟐𝒚 − 𝟐. 𝟐𝒛 = 𝟏𝟗. 𝟔𝟐
−𝟐𝒙 + 𝟓. 𝟏𝒚 + 𝟗𝒛 = 𝟏𝟑. 𝟗𝟖

You might also like