Categories
Applied Mathematics

Jacobi’s Method to Find Solution of Simultaneous Equations

In this article, we shall study Jacobi’s Method to find the solution of simultaneous equations.

Example 01:

Solve the following equations by Jacobi’s Method, performing three iterations only.

20x + y – 2z = 17, 3x + 20 y – z + 18 = 0, 2x – 3y + 20 z = 25.

Solution:

Given equations are

20x + y – 2z = 17, 3x + 20 y – z + 18 = 0, 2x – 3y + 20 z = 25.

Rewriting above equations we get

x = (1/20)(17 – y + 2z)    ………….. (1)

y = (1/20)(-18 -3x + z)    ………….. (2)

z = (1/20)(25 – 2x + 3y)    ………….. (3)

First Iteration:

x1 = (1/20)(17 – y0 + 2z0)    ………….. (4)

y1 = (1/20)(-18 -3x0 + z0)    ………….. (5)

z1 = (1/20)(25 – 2x0 + 3y0)    ………….. (6)

Substituting x0 = 0, y0 = 0, z0 = 0 in equations (4), (5), and (6)

x1 = (1/20)(17 – (0) + 2(0)) = 17/20 = 0.85

y1 = (1/20)(-18 -3(0) + (0)) = -18/20 = – 0.9

z1 = (1/20)(25 – 2(0) + 3(0)) = 25/20 = 1.25

Second Iteration:

x2 = (1/20)(17 – y1 + 2z1)    ………….. (7)

y2 = (1/20)(-18 -3x1 + z1)    ………….. (8)

z2 = (1/20)(25 – 2x1 + 3y1)    ………….. (9)

Substituting x1 = 0.85, y1 = – 0.9, z1 = 1.25 in equations (7), (8), and (9)

x2 = (1/20)(17 – (- 0.9) + 2(1.25)) = 1.02

y2 = (1/20)(-18 -3(0.85) + (1.25)) = – 0.965

z2 = (1/20)(25 – 2(0.85) + 3(- 0.9)) = 1.03

Third Iteration:

x3 = (1/20)(17 – y2 + 2z2)    ………….. (10)

y3 = (1/20)(-18 -3x2 + z2)    ………….. (11)

z3 = (1/20)(25 – 2x2 + 3y2)    ………….. (12)

Substituting x2 = 1.02, y2 = – 0.965, z2 = 1.03 in equations (10), (11), and (12)

x3 = (1/20)(17 – (- 0.965) + 2(1.03)) = 1.0013 approx. x3 = 1

y3 = (1/20)(-18 -3(1.02) + (1.03)) = – 1.0015 approx. y3 = – 1

z3 = (1/20)(25 – 2(1.02) + 3(- 0.965)) = 1.0033 approx. z3 = 1

After three iterations x = 1, y = -1, and z = 1 (approx.)

Example 02:

Solve the following equations by Jacobi’s Method, performing three iterations only.

10x + y + 2z = 13, 3x + 10y + z = 14, 2x + 3y + 10z = 15.

Solution:

Given equations are

10x + y + 2z = 13, 3x + 10y + z = 14, 2x + 3y + 10z = 15.

Rewriting above equations we get

x = (1/10)(13 – y – 2z)    ………….. (1)

y = (1/10)(14 – 3x – z)    ………….. (2)

z = (1/10)(15 – 2x – 3y)    ………….. (3)

First Iteration:

x1 = (1/10)(13 – y0 – 2z0)    ………….. (4)

y1 = (1/10)(14 – 3x0 – z0)    ………….. (5)

z1 = (1/10)(15 – 2x0 – 3y0)    ………….. (6)

Substituting x0 = 0, y0 = 0, z0 = 0 in equations (4), (5), and (6)

x1 = (1/10)(13 – (0) – 2(0)) = 13/10 = 1.3

y1 = (1/10)(14 – 3(0) – (0)) = 14/10 = 1.4

z1 = (1/10)(15 – 2(0) – 3(0)) = 15/10 = 1.5

Second Iteration:

x2 = (1/10)(13 – y1 – 2z1)    ………….. (7)

y2 = (1/10)(14 – 3x1 – z1)    ………….. (8)

z2 = (1/10)(15 – 2x1 – 3y1)    ………….. (9)

Substituting x1 = 1.3, y1 = 1.4, z1 = 1. 5 in equations (7), (8), and (9)

x2 = (1/10)(13 – (1.4) – 2(1.5)) = 0.86

y2 = (1/10) (14 – 3(1.3) – (1.5))    = 0.86

z2 = (1/10) (15 – 2(1.3) – 3(1.4))    = 0.82

Third Iteration:

x3 = (1/10)(13 – y2 – 2z2)    ………….. (10)

y3 = (1/10)(14 – 3x2 – z2)    ………….. (11)

z3 = (1/10)(15 – 2x2 – 3y2)    ………….. (12)

Substituting x2 = 0.86, y2 = 0.86, z2 = 0.82 in equations (10), (11), and (12)

x3 = (1/10)(13 – (0.86) – 2(0.82)) = 1.05 approx. x3 = 1

y3 = (1/10) (14 – 3(0.86) – (0.82))    = 1.06 approx. y3 = 1

z3 = (1/10) (15 – 2(0.86) – 3(0.86))    = 1.07 approx. z3 = 1

After three iterations x = y = z = 1 (approx.)

Example 03:

Solve the following equations by Jacobi’s Method, performing three iterations only.

5x – y + z = 10, 2x + 4y = 12, x + y +5z = -1.

Solution:

Given equations are

5x – y + z = 10, 2x + 4y = 12, x + y +5z = -1.

Rewriting above equations we get

x = (1/5)(10 + y – z)    ………….. (1)

y = (1/4)(12 – 2x)    ………….. (2)

z = (1/5)(- 1 – x – y)    ………….. (3)

First Iteration:

x1 = (1/5)(10 + y0 – z0)    ………….. (4)

y1 = (1/4)(12 – 2x0)    ………….. (5)

z1 = (1/5)(- 1 – x0 – y0)    ………….. (6)

Substituting x0 = 0, y0 = 0, z0 = 0 in equations (4), (5), and (6)

x1 = (1/5)(10 + (0) – (0)) = 2

y1 = (1/4)(12 – 2(0)) = 3

z1 = (1/5)(- 1 – (0) – (0)) = – 0.2

Second Iteration:

x2 = (1/5)(10 + y1 – z1)    ………….. (7)

y2 = (1/4)(12 – 2x1)    ………….. (8)

z2 = (1/5)(- 1 – x1 – y1)    ………….. (9)

Substituting x1 = 2, y1 = 3, z1 = – 0.2 in equations (7), (8), and (9)

x2 = (1/5)(10 + (3) – (- 0.2)) = 2.64

y2= (1/4)(12 – 2(2)) = 2

z2 = (1/5)(- 1 – (2) – (3)) = – 1.2

Third Iteration:

x3 = (1/5)(10 + y2 – z2)    ………….. (10)

y3 = (1/4)(12 – 2x2)    ………….. (11)

z3 = (1/5)(- 1 – x2 – y2)    ………….. (12)

Substituting x0 = 2.64, y0 = 2, z0 = – 1.2 in equations (10), (11), and (12)

x3 = (1/5)(10 + (2) – (- 1.2)) = 2.64

y3 = (1/4)(12 – 2(2.64)) = 1.68

z3 = (1/5)(- 1 – (2.64) – (2)) = – 1.128

After three iterations x = 2.64, y = 1.68, and z = – 1.128 approx.

Example 04:

Solve the following equations by Jacobi’s Method, performing three iterations only.

10x – 2y – 2z = 6, – x – y + 10z = 8, – x + 10y – 2z = 7.

Solution:

Given equations are

10x – 2y – 2z = 6, – x – y + 10z = 8, – x + 10y – 2z = 7.

Rewriting above equations we get

x = (1/10)(6 + 2y + 2z)    ………….. (1)

y = (1/10)(7 + x + 2z)    ………….. (2)

z = (1/10)(8 + x + y)    ………….. (3)

First Iteration:

x1 = (1/10)(6 + 2y0 + 2z0)    ………….. (4)

y1 = (1/10)(7 + x0 + 2z0)    ………….. (5)

z1 = (1/10)(8 + x0 + y0)    ………….. (6)

Substituting x0 = 0, y0 = 0, z0 = 0 in equations (4), (5), and (6)

x1 = (1/10)(6 + 2(0) + 2(0)) = 0.6

y1 = (1/10)(7 + (0) + 2(0)) = 0.7

z1 = (1/10)(8 + (0) + (0)) = 0.8

Second Iteration:

x2 = (1/10)(6 + 2y1 + 2z1)    ………….. (7)

y2 = (1/10)(7 + x1 + 2z1)    ………….. (8)

z2 = (1/10)(8 + x1 + y1)    ………….. (9)

Substituting x1 = 0.6, y1 = 0.7, z1 = 0.8 in equations (7), (8), and (9)

x2 = (1/10)(6 + 2(0.7) + 2(0.8)) = 0.9

y2 = (1/10)(7 + (0.6) + 2(0.8)) = 0.92

z2 = (1/10)(8 + (0.6) + (0.7)) = 0.93

Third Iteration:

x3 = (1/10)(6 + 2y2 + 2z2)    ………….. (10)

y3 = (1/10)(7 + x2 + 2z2)    ………….. (11)

z3 = (1/10)(8 + x2 + y2)    ………….. (12)

Substituting x2 = 0.9, y2 = 0.92, z2 = 0.93 in equations (10), (11), and (12)

x3 = (1/10)(6 + 2(0.92) + 2(0.93)) = 0.97, approx. x3 = 1

y3 = (1/10)(7 + (0.9) + 2(0.93)) = 0.976, approx. y3 = 1

z3 = (1/10)(8 + (0.9) + (0.92)) = 0.982, approx. z3 = 1

After three iterations x = y = z = 1 approx.

Example 05:

Solve the following equations by Jacobi’s Method, performing three iterations only.

5x – y + z = 10, 2x + 4y = 12, x + y + 5z = 1 with initial solution (2, 3, 0).

Solution:

Given equations are

5x – y + z = 10, 2x + 4y = 12, x + y + 5z = 1.

Rewriting above equations we get

x = (1/5)(10 + y – z)    ………….. (1)

y = (1/4)(12 – 2x)    ………….. (2)

z = (1/5)(1 – x – y)    ………….. (3)

First Iteration:

x1 = (1/5)(10 + y0 – z0)   ………….. (4)

y1 = (1/4)(12 – 2x0)    ………….. (5)

z1 = (1/5)(1 – x0 – y0)    ………….. (6)

Substituting x0 = 2, y0 = 3, z0 = 0 in equations (4), (5), and (6)

x1 = (1/5)(10 + (3) – (0)) = 2.6

y1 = (1/4)(12 – 2(2)) = 2

z1 = (1/5)(1 – (2) – (3)) = – 0.8

Second Iteration:

x2 = (1/5)(10 + y1 – z1)   ………….. (7)

y2 = (1/4)(12 – 2x1)    ………….. (8)

z2 = (1/5)(1 – x1 – y1)    ………….. (9)

Substituting x1 = 2.6, y1 = 2, z1 = – 0.8 in equations (7), (8), and (9)

x2 = (1/5)(10 + (2) – (- 0.8)) = 2.56

y2 = (1/4)(12 – 2(2.6)) = 1.7

z2 = (1/5)(1 – (2.6) – (2)) = – 0.72

Third Iteration:

X3 = (1/5)(10 + y2 – z2)   ………….. (10)

y3 = (1/4)(12 – 2x2)    ………….. (11)

z3 = (1/5)(1 – x2 – y2)    ………….. (12)

Substituting x2 = 2.56, y2 = 1.7, z2 = – 0.72 in equations (10), (11), and (12)

x2 = (1/5)(10 + (1.7) – (- 0.72)) = 2.484

y2 = (1/4)(12 – 2(2.56)) = 1.72

z2 = (1/5)(1 – (2.56) – (1.7)) = – 0.652

After three iterations x = 2.484, y = 1.72, and z = – 0.652 approx.

Leave a Reply

Your email address will not be published. Required fields are marked *