Download as xlsx, pdf, or txt
Download as xlsx, pdf, or txt
You are on page 1of 16

What is Jacobi method?

- Jacobi method is iterative method used to solve system o

EXAMPLE:
7x+z=6
z-3y=7
2x+y+3z=15

STEP 1:
Arrange equations

x y z constant
7 0 1 6
0 -3 1 7
2 1 3 15

STEP 3:
Initial Guess

ITERATION
Initial Guess 1 2 3
x 0
y 0
z 0

STEP 4:
Substitute values from the previous iteration

Initial Guess 1 2 3
x 0 0.857 1.905 2.376
y 0 2.333 4.286 5.085
z 0 5.000 6.349 7.698
STEP 5:
If two consecutive same values, stop iteration

Initial Guess 1 2 3
x 0 0.857 1.905 2.376
y 0 2.333 4.286 5.085
z 0 5.000 6.349 7.698
bi method?
used to solve system of equations

STEP 2:
Transform equations

𝑥=(6+𝑦+𝑧)/7 𝑦=(7+x+𝑧)/3 𝑧=(15+2𝑥+𝑦)/3

ITERATION
4 5 6 7 8

ITERATION
4 5 6 7 8 9
2.683 2.853 2.953 3.011 3.045 3.064
5.692 5.987 6.180 6.284 6.347 6.382
8.279 8.686 8.898 9.029 9.102 9.145
ITERATION
4 5 6 7 8 9
2.683 2.853 2.953 3.011 3.045 3.064
5.692 5.987 6.180 6.284 6.347 6.382
8.279 8.686 8.898 9.029 9.102 9.145
+2𝑥+𝑦)/3

10 11 12 13 14 15
3.075 3.082 3.086 3.088 3.089 3.090
6.403 6.415 6.422 6.426 6.429 6.430
9.170 9.185 9.193 9.198 9.201 9.202
10 11 12 13 14 15
3.075 3.082 3.086 3.088 3.089 3.090
6.403 6.415 6.422 6.426 6.429 6.430
9.170 9.185 9.193 9.198 9.201 9.202
16 17 18
3.090 3.091 3.091
6.431 6.431 6.431
9.203 9.204 9.204
16 17 18
3.090 3.091 3.091
6.431 6.431 6.431
9.203 9.204 9.204
f(a) = f(1.1) = 0.2086 positive

Equation: 𝒆^(−𝒙)−𝟑𝒍𝒐𝒈𝒙=𝟎 f(b) = f(1.26) = -0.0174 negative


x = 1.2468
Therefore, your interval must be near 1.2468

Iteration a b c f(c)
Initial Guess 1.10000 1.26000 1.18000 0.09163 positive
1 1.18000 1.26000 1.22000 0.03615 positive
2 1.22000 1.26000 1.24000 0.00912 positive
3 1.24000 1.26000 1.25000 -0.00423 negative
4 1.24000 1.25000 1.24500 0.00243 positive
5 1.24500 1.25000 1.24750 -0.00090 negative
6 1.24500 1.24750 1.24625 0.00077 positive
7 1.24625 1.24750 1.24688 -0.00007 negative
8 1.24625 1.24688 1.24656 0.00035 positive
9 1.24656 1.24688 1.24672 0.00014 positive
10 1.24672 1.24688 1.24680 0.00004 positive
11 1.24680 1.24688 1.24684 -0.00002 negative
12 1.24680 1.24684 1.24682 0.00001 positive
13 1.24682 1.24684 1.24683 0.00000 negative
14 1.24682 1.24683 1.24682 0.00000 positive
15 1.24682 1.24683 1.24682 0.00000
If f(c) is +, retain b change a to c. If f(c) is -, retain
a change b to c. Interval is okay, since root/s lie
between positive and negative intervals

Notes
for the next iteration, retain b change a to c
for the next iteration, retain b change a to c
for the next iteration, retain b change a to c
for the next iteration, retain a change b to c
for the next iteration, retain b change a to c
for the next iteration, retain a change b to c
for the next iteration, retain b change a to c
for the next iteration, retain a change b to c
for the next iteration, retain b change a to c
for the next iteration, retain b change a to c
for the next iteration, retain b change a to c
for the next iteration, retain a change b to c
for the next iteration, retain b change a to c
for the next iteration, retain a change b to c
for the next iteration, retain b change a to c
stop iteration, f(c) = 0
Find a root of an equation f(x)=2x³-2x-5=0 using Fixed Point Iteration method.

Solution:
Let f(x)=2x³-2x-5=0

Here 2x³-2x-5=0
•2x³=2x+5
•x³=2x+52
•x=³√2x+52

We find the value of x⁰, for which we have to find a and b such that f(a)‹0 and f(b)›0
Now, f(1)=-5 f(2)=7
Thus, a=1 and b=2

Therefore, x⁰= 1+2/2= 1.5


x¹= 2x³=2(1.5)+5= 1.5874
x²= 2x³=2(1.5874)+5= 1.59887
x³= 2x³=2(1.59887)+5= 1.60037
x⁴= 2x³=2(1.60037)+5= 1.60057
x⁵= 2x³=2(1.60057)+5= 1.60059
x⁶= 2x³=2(1.60059)+5= 1.60059
x⁷= 2x³=2(1.60059)+5= 1.60059 ≈ 1.6006

Iteration 2x³=2x+5
1 1.5 1.5874
2 1.5874 1.59888
3 1.59888 1.60037
4 1.60037 1.60057
5 1.60057 1.60059
6 1.60059 1.60059
7 1.60059 1.60059

The root of 2x³-2x-5=0 by the fixed point iteration method is 1.6006


STEP 1:
Equation: 〖𝒕𝒂𝒏〗 ^(−𝟏) (𝟏−𝒙)− 〖𝒕𝒂𝒏〗 ^(−𝟏)
(𝟏+𝒙)= 〖𝒕𝒂𝒏〗 ^(−𝟏) 𝟏/𝟖
x = - 0.124038
Degree is 1, therefore there is only one root

f(x) f'(x)
(−𝟐𝒙^𝟐−𝟒)/( 〖 (𝒙 〗 ^𝟐 −𝟐𝒙+𝟐)(𝒙^𝟐+𝟐𝒙+𝟐))
〖𝒕𝒂𝒏〗 ^(−𝟏) (𝟏−𝒙)− 〖𝒕𝒂𝒏〗 ^(−𝟏)
(𝟏+𝒙)− 〖𝒕𝒂𝒏〗 ^(−𝟏) 𝟏/𝟖

Use Intial Guess x = 0 STEP 3:

Iteration 𝒇 (𝒙_𝒑𝒓𝒆𝒗𝒊𝒐𝒖𝒔)𝒇′(𝒙_𝒑𝒓𝒆𝒗𝒊𝒐𝒖𝒔)
1 -0.124355
2 0.000319
3 0.000000
4 0.000000
5 0.000000
6 0.000000
USE THIS FORMULA TO GET THE X
STEP 4:
𝑥_(𝑛+1)=𝑥_𝑛−(𝑓(𝑥_𝑛))/(𝑓′(𝑥_𝑛)) or
𝑥_𝑝𝑟𝑒𝑠𝑒𝑛𝑡=𝑥_𝑝𝑟𝑒𝑣𝑖𝑜𝑢𝑠−(𝑓(𝑥_𝑝𝑟𝑒𝑣𝑖𝑜𝑢𝑠))/(𝑓′
(𝑥_𝑝𝑟𝑒𝑣𝑖𝑜𝑢𝑠))
STEP 2:
f'(x)
/( 〖 (𝒙 〗 ^𝟐 −𝟐𝒙+𝟐)(𝒙^𝟐+𝟐𝒙+𝟐)) DERIVATIVE OF THE EQUATION

𝒑𝒓𝒆𝒗𝒊𝒐𝒖𝒔)𝒇′(𝒙_𝒑𝒓𝒆𝒗𝒊𝒐𝒖𝒔) 𝒙
-1.000000 -0.124355
-1.007672 -0.124038 STEP 5:
-1.007633 -0.124038
-1.007633 -0.124038 TWO CONSECUTIVE SAME ANSWERS, STOP THE ITERATIO
-1.007633 -0.124038
-1.007633 -0.124038
𝑓′

STOP THE ITERATION.


STEPS
1 Arrange equatons
2 Transform equation
3 Initial Guess
4 Substitute values from the present iteration
5 If two consecutive same values, stop iteration

STEP 1:
x y z constant
10 -1 3 7
1 11 -5 5
2 -1 13 8

STEP 2:

STEP 3, 4 AND 5
Iteration
Initial guess 1 2 3 4 5 6
x o 0.7 0.57776 0.59178 0.59367 0.59371 0.5937
y 0 0.39091 0.64646 0.66267 0.66208 0.66193 0.66192
z 0 0.53776 0.57623 0.57532 0.57498 0.57496 0.57496
7
0.5937
0.66192
0.57496

You might also like