Professional Documents
Culture Documents
Supposing are given, we want to solve for . And assuming that the
is nonzero, then a unique solution to exists.
In matrix form of
[ ][ ] [ ]
[ ][ ] [ ]
or in general form,
∑
GAUSS ELIMINATION METHOD
[ ][ ] [ ]
[ ][ ] [ ]
[ ][ ] [ ]
[ ][ ] [ ]
[ ][ ] [ ]
By Back Substitution:
; ;
B. PITFALLS OF GAUSS ELIMINATION
1. Division by zero (That is, division by where or very near to zero)
The technique to solve this problem is by pivoting. The process is to
determine the largest available coefficient in the column where the pivot
element belongs. The rows can also be interchanged so that the largest
element is the pivot element.
2. Round-off Errors
There is a slight discrepancy in the result of the solution depending on the
number of significant figures used, which means that more significant figures
reduce error.
C. GAUSS JORDAN
This method is a slight variation of Gauss Elimination method. The
elimination steps result in an identity matrix rather than an upper triangular
matrix as in Gauss Elimination.
In the elimination process, all rows are normalized by dividing them by their
pivot elements.
The general process is to multiply eqn. k by and subtract the product
from eqn. n where and k
is the kth step of the elimination process.
The result is an identity matrix:
[ ][ ] [ ]
[ ][ ] [ ]
[ ][ ] [ ]
[ ][ ] [ ]
[ ][ ] [ ⁄ ]
[ ][ ] [ ]
[ ][ ] [ ]
[ ][ ] [ ]
[ ][ ]
[ ]
[ ][ ] [ ]
By Direct Substitution:
; ;
D. LU DECOMPOSITION
A method of solving algebraic equations by manipulating the elimination
process on the right side of the equation.
;
Express matrix A as an upper triangular matrix:
[ ][ ] [ ]
[ ]
{ }
Solution Steps:
1. LU Decomposition step: Matrix is factored or decomposed into lower
and upper triangular matrices.
2. Substitution Step: Matrices and are used to determine a solution
for the right hand side of the equation where the equation
is used to generate intermediate vector by forward
substitution.
o The result is substituted into , which can be solved
by back substitution.
[ ]
[ ]
By the formula
[ ]
[ ][ ]
[ ][ ] [ ]
[ ][ ] [ ]
[ ] [ ]
[ ][ ] [ ]
By back substitution and making use of the formula:
∑
[ ] [ ]
E. TRIDIAGONAL MATRIX
A banded matrix is a square matrix that has all elements equal to zero, with
the exemption of a band centered on the main diagonal.
A tridiagonal system – that is, one with a bandwidth of 3 – can be expressed
as
This was done to avoid storing large numbers of useless zeros in the square
matrix . This space saving modification is advantageous because the
resulting algorithm requires less computer memory.
F. CHOLESKY DECOMPOSITION
This is a very popular approach of solving system of equations by using
symmetric matrices.
A symmetric matrix is one where . In other words,
.
Cholesky Decomposition method has lower triangular factors of matrix
which are Transpose of each other.
The elements of the Lower triangular matrix can be derived using the
formulas:
∑
√ ∑
G. ITERATIVE SOLUTION TO LINEAR ALGEBRAIC EQUATIONS: JACOBI
AND GAUSS-SEIDEL
The stopping criterion:
| |
∑ ∑
Where D contains only the diagonal elements of matrix A and all other
elements are zero (0) and matrix A is the coefficient matrix of the given sets
of equations.
[ ]
[ ]
EXAMPLE 5: Using Jacobi Iteration, Find the values of . Start with the
values of and continue until . Given are:
Rewriting the equations:
@ :
@ :
| |
Note: Continue iteration until tolerance value is acceptable (that is, less than
).
In Matrix Form:
[ ][ ] [ ]
[ ]
[ ] [ ] [ ] [ ]
[ ]
[ ]
[ ] [ ]
From the formula:
[ ] [ ][ ][ ] [ ][ ]
@ Iteration 1:
[ ] [ ][ ][ ] [ ][ ] [ ]
@ Iteration 2:
[ ] [ ][ ][ ] [ ][ ]
[ ]
@ Iteration 3:
[ ] [ ][ ][ ] [ ][ ]
[ ]
@ Iteration 4:
[ ] [ ][ ][ ] [ ][ ]
[ ]
Iteration 0 1 2 3 4 …
0 0.6 0.434 … 0.4875
0 0.3333 0.2003 … 0.225
---
∑ ∑
In Matrix Form:
Where D is a Lower Triangular Matrix of matrix A and matrix A is the
coefficient matrix of the given sets of equations.
[ ]
[ ]
@ :
@ :
| |
In Matrix Form:
[ ][ ] [ ]
[ ]
[ ] [ ] [ ] [ ]
[ ]
[ ]
[ ] [ ]
From the formula:
[ ]
[ ][ ][ ]
[ ][ ]
@ Iteration 1:
[ ] [ ][ ][ ] [ ][ ]
[ ]
@ Iteration 2:
[ ]
[ ][ ][ ]
[ ][ ] [ ]
@ Iteration 3:
[ ]
[ ][ ][ ]
[ ][ ] [ ]
@ Iteration 4:
[ ] [ ][ ][ ] [ ][ ]
[ ]
Iteration 0 1 2 3 4 …
0 0.6 … 0.4875
0 … 0.225
---
The previous value is used in the right side of the equation to generate
the new value of on the left side.
Thus,
This equation is similar to the Jacobi and Gauss Seidel methods (linear
methods) used for nonlinear equations, where matrix D has to be specified.
[ | ]
[ | ]
[ | ]
[ ]
o The matrix , whose elements are partial derivatives is
called Jacobian Matrix.
o Newton Raphson is similar to extended Gauss Seidel method where D
is replaced by J(i).
EXAMPLE 7: Using Newton Raphson method, find the solution to the given nonlinear
algebraic equations. Assume initial values of .
[ | ] [ ]
[ ]
[ ]
[ ]
[ ]
[ ( )]
[ ] [ ] [ ] {[ ] [ ]}
@ Iteration 1: [ ] [ ] [ ] {[ ] [ ]}
[ ] [ ] [ ][ ] [ ]
@ Iteration 2: [ ] [ ] [ ] {[ ]
[ ]}
[ ] [ ] [ ][ ] [ ]
Note: Continue iteration until tolerance value is acceptable (that is, less than
).
Iteration 0 1 2 3 4 …
4 5.2 … 0.4875
9 .8 … 0.225
--- --- --- --- --- --- ---
ASSIGNMENT 2:
Problem 1: Develop a program using Jacobi Method and 2) Gauss-Seidel Method to solve
for the unknown variables of the given system of equations below. Make initial guess that allows
your solution to converge. Set the stopping criterion equal to .
[ ][ ] [ ]
Problem 2: Develop a Newton-Raphson Program that finds the solution of the given non-
linear system of equations (in matrix form) where are in radians. Start with
and continue until .
[ ] [ ]
GOD BLESS