Gauss Jacobi Glimation Method
An = b
• known that rank A = rank I = n (the no. of
variable)
• A is a square matrate
The system has unique solution
x = (x, 1×21×31 ---.. Km)
A = LTD + U
upper
lower diagonal diagonal
diagonal matrix matrix
matrix
L + ☐ + u) x = b
☆ Dr = - ((+ c) a + b
suppose ☐ is invertible
x= - ☐ → (atu) n + D-'b
x (o) - ([Link]. a. (o)...--, an'")
x'" _ - ☐ → (Ltv) ✗ 10) + ☐ -' b
reckti) - - ☐ " (Ltv) x" + D- 'b for ✗ = 0,1,...
n
sickt') = , bi - Σ Aij xj (K) • for i = 1,21.-m
Aii
j
I bi - ¥, [Link]) - Σ [Link]
Aii j>i
Gauss - Seidel Method
no) = (alot, - Rm (o)
xi'"" = I bi - jΣai [Link]; ("") -j>Σ: "is "I'")
aii
•
= 1,2, - - -- / m
e.g. consider In + y + 22 = 13
a + BY + 2 = 12
- n #2y + 42=8
complete the first- iteration a") using Gauss -
Jacobi Method & Gauss - Seidel Method by taking
the initial case x"):(!)
n
x1" = b, - aijxj")
All j=,
j#.
x,'" - I
13 - 1×1 - 2×1 2
5
• (o)
x2" = 1
b2 azj. xp
922 "= 1
j#2
I
12 - i - i / 0
3
3
n
N}
(t) = bs - Σ [Link]. (o) = /
8 +1 - 2
A 33
j-I 4
7/4
Hence , n'" = (2, 10/3 , 7 4)
now, by Gauss Seidel Method.
ni
CK +1 ) = ' "
- jΣai Gija; '"t') - js, [Link]'
aii
µ,'"= 2
Na (t) = I 12 - 1×2 - 1×1 3
23 ' "= l 8 - C- 1) x2 - 2×3
I 8 + 2 - 6 = l
4
Ere:- 4mi + 222 + A 3 = 4
R, + 3×2 +13 = 4
3211 + 222 + 643 = 7
Initial guess x
(o) = 0.1 • Compule x"" using
0.8 Gauss Jacobi method
O.)
and Gauss siedel method.
Gauss Jacobi
x!" = 4 - 2m20) - 1× ✗ 361]
All
= - I
4 - 2×0.8 - 1×0.5
4
3. 3 4
na'"' = 1 (4 - 1×0.1 - 1×0.5
3
= 3.4 3
✗ 311) = l 7 - 3×0-1 - 2×0.8 1.- 5. 1 6
x") = (0.825, 1. 133, 0.85)
do Gauss Siedel
Definition Anxm said to be diagonally dominant
i
By rows if
laill ≥ lacalt - ---t lain /
19?2/ ≥ 19211 + 19231 +...- + /aan
-
:
laurel ≥ lamil + lanal t --it / ann-it
A is said to be strictly diagonally dominant
by rows if all the above inequalities hold
strictly. (≥ - >)
Theorem → Suppose we hone a system of linear
equations An = b, where A is a square matrix
if A is strictly diagonally dominant-by rows,
then the L-J and G-S methods both converge
for any itial case
En → Make the following system
2n-By + 202 = 25
20N + y -22 = 17
3N + 2y - 2 = -80
into a system whose coefficient matrix is
diagonally dominant-then by the a. s- method
the second iteration by taking the initial case.
✗ 10) = 0
◦
Rearranging the order of- q"
204 + Y - 22 = 1 7
32 +20g - 2 = - 18
2x - 3y + 202 = 25
210) -
a.
(K + 1)
=
(17 - na'"' + 2×3 (K))
20
(K+1) (K+')
- 321
(K))
x2 l ( -18 + A 3
20
(K+))
(K +1)
25 - 2x, + 3×2×+11)
Nz =
20
x1"= 1 (n) = 0- 85
20
x2 (t)
1. 0275
x}'" = 1. 0109
x" 0 - 85
- 1.0275
1- 0109
(2)
now, x comes 1. 0025
- 0.9998
0.9998
Fixed Point-Slération Method
Bisection method
Newton Rapscom method
Secant- Method
Fixed Point Ilimation Method
flu)-o *
↓
a = g (n) *
initial guess no
N- = g (no)
n- = g(nil
Nkt' = g (Nk) for K - 0, 1, 2, -
if do in,.dz... - converge to s , then s is a
solution or root of *
e.g. x²- 39 + 1 = ° *
roots are 1. 5± 1 - 25
= 2.618034 and 0.381966.
n = 1 (m² + 1) ⇒ (n) *
initial guess no = 1
Ni = g (no) = 2/3
"a = g (ai) = (4/9+1) = 0.48'
3
"3 = g (ma) = - 411
nu-g (as) = 0.390
-: (no 1N , / N2, 73 , Nu. .. is approaching to the
second Mood-
initial guess no = 3
&, = 913) = 3.33
Nz = g (mi) = 4.037
as = g (m.) = 5. 766
nu = g n z) = 11.415
- ". ( no, ni , na , ns, du...- ⅔ does not converge
now m² - 3m + 1 = °
can also be written as n= 3 - 1 =gin)
n
initial guess 1 No = 1
n. = g (no) = 2
d- = g (ni) = 2.5
"3 -g(a) = 2.6
Nu = g (Nz) = 2. 615
No, Mi, N2, 23, Ny, - --↳ CONWYging to the first
roof-of the egm
Theorem fens-o *
Suppose it is known that- S is a solution of
the q *
and it-can be written as n-g (n) * T
suppose g (x) is continuously differentiable in the
open internal containing the root- s.
gens ≤K< 1 , all points on that interval
Then the fixed point ilination method is always
convergent- to the tool-s for any initial guess
No one that internal.
Proof (no, [Link].. _.. / converges to rood- s
we have to preone lim Um = S
M-D
Un-s g (nm-i) - g (s) by meas value
theorem
= g' (s)/un-r -s] g:(am-is] → R
glam-1)-gls) = g ' (s)
≤ ☑ [un-r - s Mm-i - S
< ☑ 2 [Mm-2 - s] JE (nm-i. s)
÷.
≤ k" [no -s]
applying lim n- a
lim Nm-S = 0 at lim Mm = S
no m→0
Find a solm of ✗ 3+1 - 1 = 0 by the fined point
iteration method.
A = l → here deciminative is
x2 + ) always less than I
initial guess x. = I
N, = 0-5
✗2 = 0.8
M 3 = 0- 61
My = 0-729
As = 0-663
M6 = 0. 70 1
finally they converges to O - 682328
Intermediate value theorem
([Link]))
f (a, b) → R continuous
fla) f (b) < °
Them there exists a point-
C
CE (a, b) such that
(b, f (b)) f (c) = 0
i. c. any odd degree polynomial has a real root
Bisection Method divide the internal into
([Link])) two parts. if middle is zero
done, if middle 20 shift to
left half if middle > o
shift too right- half,
C
Binary Search in PDS
(b, f (b))
e.g. → Perform five iterations of the bisection method
to obtain a root of the equ
x?-5k + 1 0
fin)
-
f (o)=1 f (i) = -3
Ak bk (ax + bk) 2
✗ = 0 I 0. 5
£70 5<0 to
K = 1 0 0. 5 0-25
770 120
to
☑ = 2 ◦ 0.25 0. 125
to t' -
K- 3 0. 125 0. 25 0 - 1875
£70 to + > 0
K =4 0.1875 0-25 0 - 21875
170 £20
f 40
K=5 0.1875 0- 21875 0. 203125
170 to
Newton Raphson Method
- (a) = 0
Assumption → f (a) is continuously differentiable.
i. e. flu) is differentiable and f ' (x) is
continuous.
tangent-
initial guess → no
(no, f- 40))
tan 0 = f (no) = f' (no)
No -N,
N2 x, No ni = no - f (no)
f' (a)
sent, = an - flan), for
f' (un) n= 0,112,..
e.g. setup the ilireation to find the square root-
of a given positive number c,
find .
x = r
C
☆ f (a) = x2- C = 0
he-, initial guess no
✗ n+, = am - flam)
f ' (nm)
✗ Mti = Mm - Nh-C
2mn
Anti = 2I (Rm + C for 4=011,2, -- -
An
when c = 2
AM + I = I An + 2
2 Nn
at, No = 1
✗ 1 = 1.5 N2 = 1.4167
✗ 3 = 1. 4142
My = 1- 4 142
- R = 1. 4142
e.g. Find a positive solution of- 2- inn = a
"- f (n) = N -2sina
Nmt I = nm - form)
f '(an)
Ant' = Mm - a- 2 sin In
1 - 2 cossen
anti = 2 (siman - uncos an) 1 for M= 011, 2 , _ _. -
1- 2105 Am
initial guess no = 2
x, = 2 (sin 2 - 2 cos 2) - 1.90100
1 - 2 cees 2
22 = 1-89552
23 = 1 -89 550 44=1 - 89549
- ". Ny = 1. 89549 is the exact- root uplo 5 digit
accuracy
Task find a root of the g- as + a-1=0
with initial guess no = 1
Secant-Method
flao) & feni) don't need
to be opposite in
m²
x,
sign.
}
No
suppose we have an-1 , /Can-1) . an & flam)
y-flam) = flan)-flan-i) ✗ Cx - Rm)
Rm - Nm-1
if y = ◦
anti = nm - flan) ✗ (nm - nm-1) for,
flum) -flam-l) n= 112,31..-
in Newton Raphso method
similar as
final ≈ flan) -flame,)
Anti = un - f (an)
Mm - Mm-1
f/(nm)
here the functions needs not to be differentiable,
e.g. 23- 8m-4 = O
Net, no = 3 f (3) = -120 + (4) = 28>0
f(3.5) 70
Let-, initial guess be No =3 & n, = 3 - 5
dm flan) ✗ Mtl
No =3 +
M, = 3.5 0. 875 A2 = 3-0421
Nz = 3.0421 - 0.1841 Nz = 3.0497
R3= 3- 0497 - 0-0333 My = 3. 0514
My =3. 0514 0-0005 set = 3.0514
i. as = 3 - 0514 is the exact- root- up to 4 digits
Nut, = An /(mm) Mm-Mm-1
f (Rn) --(mu-i)
= an f (an) -unflam-i) -anf (rn)
+ am-if (an)
flan) - flam-i)
Rm I = an-if (an) - auf (nm-i)
flan) - f (am-il
Polynomial Interpolation
fen)
f-(1)=3 f (2) = 7 - (3) = 31 flu) = -2
f (1. 5) =?
if no. of data point is 3 f (x) is 2 degree
polynomial
if no. of data point is 4 f (x) is 3 degree
polynomial
and so on
theorem Suppose we have n+, dato points
[Link]), ([Link]). -.._, (nn, yn)
then there exists an unique polynomial
of- degree almost ~ satisfying these data
points
Solm: Suppose , p (a) = Go + aint-.. -t anan
is a polynomial of degree In
suppose p (n) satisfies the data points
do + 9, no + 92202 + + am no" = yo
do + and i t - t amain = y,
: : :
do + a, ant. + Aman" = yn
total Mtl variables and n-1 equations
- x♂ Ao
I no no". yo
- x? at
I x, x,". y'
i
I an km². - x?
an ju
we get unique solution when 1A/ ≠ 0
d- (A) = T (ai-nj)
for any i=j
i = it on
j = lton nitaj
it j .: dit (A) ≠ 0
- : the polynomial is unique
so for u +1 points we get an unique polynomial
of degree ≤ n
suppose two data points (110) , (2. 5)
do + aim: y
N do + a, = 0 do + 291 = 5
of a, = 5
90=-5