Numerical Solutions of Algebraic and Transcendental Equations
Numerical Solutions of Algebraic and Transcendental Equations
Page | 1
5.2.1 Bisection Method (or Bolzano Method)
Bisection method is used to find an
approximate root in an interval by repeatedly
bisecting into subintervals. It is a very simple
and robust method but it is also relatively
slow. Because of this it is often used to obtain
a rough approximation to a solution which is
then used as a starting point for more rapidly
converging methods. This method is based on
the intermediate value theorem for continuous
functions.
Algorithm:
Let 𝑓 𝑥 be a continuous function in the interval 𝑎, 𝑏 , such that 𝑓 𝑎 and 𝑓 𝑏 are of
opposite signs, i.e. 𝑓 𝑎 . 𝑓 𝑏 < 0.
𝑎+𝑏
Step1. Take the initial approximation given by 𝑥0 = , one of the three conditions
2
st
arises for finding the 1 approximation 𝑥1
i. 𝑓(𝑥0 ) = 0, we have a root at 𝑥0 .
𝑎+ 𝑥 0
ii. If 𝑓 𝑎 . 𝑓 𝑥0 < 0, the root lies between 𝑎 and 𝑥0 ∴ 𝑥1 = and repeat the
2
procedure by halving the interval again.
𝑥 +𝑏
iii. I𝑓 𝑓 𝑏 . 𝑓 𝑥0 < 0, the root lies between 𝑥0 and 𝑏 ∴ 𝑥1 = 0 and repeat the
2
procedure by halving the interval again.
iv. Continue the process until root is found to be of desired accuracy.
Remarks:
Convergence is not unidirectional as none of the end points is fixed. As a result
convergence of Bisection method is very slow.
Repeating the procedure 𝑛 times, the new interval will be exactly half the length of
the previous one, until the root is found of desired accuracy (error less than ∈). ∴
and at the end of𝑛𝑡ℎ iteration, the interval containing the root will be of length
𝑏−𝑎 𝑏−𝑎
𝑛
, such that 𝑛 <∈
2 2
𝑏−𝑎
⇒ log < log ∈
2𝑛
Page | 2
∴In bisection method, the minimum number of iterations required to achieve the
𝑏 −𝑎
log
∈
desired accuracy (error less than ∈)are .
log 2
0.75+1
𝑥2 = = 0.875, 𝑓 0.875 = 0.051, 𝑓 0.75 . 𝑓 0.875 < 0
2
Page | 3
Here 𝑓 2 = −4 and 𝑓 3 = 5 ⇒ 𝑓 2 . 𝑓 3 < 0
Also 𝑓 𝑥 is continuous in 2,3 , ∴ atleast one root exists in 2,3
Initial approximation: 𝑎 = 2, 𝑏 = 3
2+3
𝑥0 = = 2.5, 𝑓 2.5 = −1.8750, 𝑓 2.5 . 𝑓 3 < 0
2
Page | 4
Solution:𝑓 𝑥 = 𝑥𝑒 𝑥 − 1
Here 𝑓 0 = −1 and 𝑓 1 = 𝑒 − 1 = 1.718 ⇒ 𝑓 0 . 𝑓 1 < 0
Also 𝑓 𝑥 is continuous in 0,1 , ∴ atleast one root exists in 0,1
Initial approximation: 𝑎 = 0, 𝑏 = 1
0+1
𝑥0 = = 0.5, 𝑓 0.5 = −0.1756, 𝑓 0.5 . 𝑓 1 < 0
2
Page | 5
Hence 0.56715 is the real root correct to three decimal places.
1
Example4 Using bisection method find an approximate root of the equation sin 𝑥 =
𝑥
correct to two decimal places.
Solution:𝑓 𝑥 = 𝑥sin 𝑥 − 1
Here 𝑓 1 = sin 1 − 1 = −0.1585 and 𝑓 2 = 2sin 2 − 1 = 0.8186
Also 𝑓 𝑥 is continuous in 1,2 , ∴ atleast one root exists in 1,2
Initial approximation: 𝑎 = 1, 𝑏 = 2
1+2
𝑥0 = = 1.5, 𝑓 1.5 = 0.4963, 𝑓 1 . 𝑓 1.5 < 0
2
Page | 6
𝐴𝐵 with 𝑥-axis. Successive approximations 𝑥1 , 𝑥2 , …are given by point of intersection of
chord 𝐴′𝐵, 𝐴′′ 𝐵, …with 𝑥 − axis, until the root is found to be of desired accuracy.
Now equation of chord AB in two-point form is given by:
𝑓 𝑏 −𝑓 𝑎
𝑦−𝑓 𝑎 = (𝑥 − 𝑎)
𝑏 −𝑎
Page | 7
𝑓 0.6711 = −0.0267, 𝑓 0.6711 . 𝑓 1 < 0
Third approximation: 𝑎 = 0.6711, 𝑏 = 1
1−0.6711 0.3289
𝑥3 = .6711 − 𝑓 . 6711 = .6711 − −.0267 = 0.6796
𝑓 1 −𝑓 0.6711 1− −0.0267
First 2 decimal places have been stabilized; hence 0.6796 is the real root correct to
two decimal places.
Example6 Use Regula-Falsi method to find a root of the equation 𝑥 log10 𝑥 − 1.2 = 0
correct to two decimal places.
Solution:𝑓 𝑥 = 𝑥 log10 𝑥 − 1.2
Here 𝑓 2 = −0.5979 and 𝑓 3 = 0.2314 ⇒ 𝑓 2 . 𝑓 3 < 0
Also 𝑓 𝑥 is continuous in 2,3 , ∴ atleast one root exists in 2,3
𝑏−𝑎
Initial approximation: 𝑥0 = 𝑎 − 𝑓(𝑎) ; 𝑎 = 2, 𝑏 = 3
𝑓 𝑏 −𝑓 𝑎
3−2 1
⇒ 𝑥0 = 2 − 𝑓 2 =2− (−0.5979) = 2.721
𝑓 3 −𝑓 2 0.2314− −0.5979
First two decimal places have been stabilized; hence 2.7407 is the real root correct to
two decimal places.
Example7 Use Regula-Falsi method to find a root of the equation tan 𝑥 + tanh 𝑥 =
0 upto three iterations only.
Solution:𝑓 𝑥 = tan 𝑥 + tanh 𝑥
Here 𝑓 2 = −1.2210 and 𝑓 3 = 0.8525 ⇒ 𝑓 2 . 𝑓 3 < 0
Also 𝑓 𝑥 is continuous in 2,3 , ∴ atleast one root exists in 2,3
𝑏−𝑎
Initial approximation:𝑥0 = 𝑎 − 𝑓(𝑎) ; 𝑎 = 2, 𝑏 = 3
𝑓 𝑏 −𝑓 𝑎
3−2 1
⇒ 𝑥0 = 2 − 𝑓 2 =2− (−1.221) = 2.5889
𝑓 3 −𝑓 2 0.8525− −1.221
Page | 8
First approximation: 𝑎 = 2, 𝑏 = 2.5889
2.5889−2 0.5889
𝑥1 = 2 − 𝑓 2 =2− (−1.2210) = 2.4514
𝑓 2.5889 −𝑓 2 0.3720− −1.2210
Page | 9
Fourth approximation: 𝑎 = 0.8474 𝑏 = 1
1−0.8524 0.1476
𝑥4 = 0.8524 − 𝑓 0.8524 = 0.8524 − (−0.0009) =
𝑓 1 −𝑓 0.8524 0.7183− −0.0009
0.8526
𝑓 0.8526 = −0.00002~0,
∴ Real root of the equation 𝑥𝑒 𝑥 − 2 = 0 correct to three decimal places is 0.8526
5.2.3 Newton-Raphson Method (Geometrical Interpretation)
Newton-Raphson method named after Isaac Newton and Joseph Raphson is a powerful
technique for solving equations numerically. The Newton-Raphson method in one
variable is implemented as follows:
Let 𝛼 be an exact root and 𝑥0 be the initial approximate
root of the equation 𝑓 𝑥 = 0. First approximation 𝑥1 is
taken by drawing a tangent to curve 𝑦 = 𝑓 𝑥 at the 𝒙 𝟎 , 𝒇 𝒙𝟎
point 𝑥0 , 𝑓 𝑥0 . If 𝜃 is the angle which tangent
through the point 𝑥0 , 𝑓 𝑥0 makes with 𝑥- axis, then
slope of the tangent is given by: 𝜽
𝑓 𝑥0
tan 𝜃 = = 𝑓′ 𝑥0
𝑥 0 −𝑥 1
𝑓𝑥
⇒ 𝑥1 = 𝑥0 − 0
𝑓′ 𝑥0
𝑓 𝑥1
Similarly 𝑥2 = 𝑥1 −
𝑓′ 𝑥1
⋮
The required root to desired accuracy is obtained by drawing tangents to the curve
at points 𝑥𝑛 , 𝑓 𝑥𝑛 successively.
𝑓𝑥
∴ 𝑥𝑛 +1 = 𝑥𝑛 − 𝑓′ 𝑥𝑛
𝑛
Newton-Raphson method works very fast but sometimes it fails to converge as shown
below:
Case I:
If any of the approximations encounters a zero
derivative (extreme point), then the tangent at that
point goes parallel to 𝑥-axis, resulting in no further
approximations as shown in given figure where third
approximation tends to infinity.
Case II:
Sometimes Newton-Raphson method may run into an
infinite cycle or loop as shown in adjoining figure.
Change in initial approximation may untangle the
problem.
Page | 10
Case III:
In case of a point of discontinuity, as shown in given
figure, subsequent roots may diverge instead of
converging.
Remarks:
Newton-Raphson method can be used for solving both algebraic and
transcendental equations and it can also be used when roots are complex.
Initial approximation 𝑥0 can be taken randomly in the interval 𝑎, 𝑏 , such
that 𝑓 𝑎 . 𝑓 𝑏 < 0
Newton-Raphson method has quadratic convergence, but in case of bad choice
of 𝑥0 (the initial guess), Newton- Raphson method may fail to converge
This method is useful in case of large value of 𝑓′ 𝑥𝑛 i.e. when graph of 𝑓 𝑥
while crossing 𝑥 -axis is nearly vertical
Example 9 Use Newton-Raphson method to find a root of the equation 𝑥 3 − 5𝑥 + 3 = 0
correct to three decimal places.
Solution: 𝑓 𝑥 = 𝑥 3 − 5𝑥 + 3
⇒ 𝑓′ 𝑥 = 3𝑥 2 − 5
Here 𝑓 0 = 3 and 𝑓 1 = −1 ⇒ 𝑓 0 . 𝑓 1 < 0
Also 𝑓 𝑥 is continuous in 0,1 , ∴ atleast one root exists in 0,1
Initial approximation: Let initial approximation 𝑥0 in the interval 0,1 be 0.8
𝑓 𝑥𝑛
By Newton-Raphson method 𝑥𝑛 +1 = 𝑥𝑛 −
𝑓′ 𝑥𝑛
First approximation:
𝑓 𝑥0
𝑥1 = 𝑥0 − , where 𝑥0 = 0.8, 𝑓 0.8 = −0.488, 𝑓′ 0.8 = −3.08
𝑓′ 𝑥0
−0.488
⇒ 𝑥1 = 0.8 − = 0.6416
−3.08
Second approximation:
𝑓 𝑥1
𝑥2 = 𝑥1 − , where 𝑥1 = 0.6415 , 𝑓 0.6416 = 0.0561 , 𝑓′ 0.6416 = −3.7650
𝑓′ 𝑥1
0.05611
⇒ 𝑥2 = 0.6416 − = 0.6565
−3.7650
Third approximation:
𝑓 𝑥2
𝑥3 = 𝑥2 − , where 𝑥2 = 0.6565 , 𝑓 0.6565 = 0.0004 , 𝑓′ 0.6565 = −3.7070
𝑓′ 𝑥2
0.0004
⇒ 𝑥3 = 0.6565 − = 0.6566
−3.7070
Page | 11
Example 10 Find the approximate value of 28 correct to 3 decimal places using
Newton Raphson method.
Solution: 𝑥 = 28 ⇒ 𝑥 2 − 28 = 0
∴ 𝑓 𝑥 = 𝑥 2 − 28
⇒ 𝑓′ 𝑥 = 2𝑥
Here 𝑓 5 = −3 and 𝑓 6 = 8 ⇒ 𝑓 5 . 𝑓 6 < 0
Also 𝑓 𝑥 is continuous in 5,6 , ∴ atleast one root exists in 5,6
Initial approximation: Let initial approximation 𝑥0 in the interval 5,6 be 5.5
𝑓 𝑥𝑛
By Newton-Raphson method 𝑥𝑛 +1 = 𝑥𝑛 −
𝑓′ 𝑥𝑛
First approximation:
𝑓 𝑥0
𝑥1 = 𝑥0 − , where 𝑥0 = 5.5, 𝑓 5.5 = 2.25, 𝑓′ 5.5 = 11
𝑓′ 𝑥0
𝟐.𝟐𝟓
⇒ 𝑥1 = 5.5 − = 5.2955
11
Second approximation:
𝑓 𝑥1
𝑥2 = 𝑥1 − , where 𝑥1 = 5.2955, 𝑓 5.2955 = 0.0423, 𝑓′ 5.2955 = 10.591
𝑓′ 𝑥1
0.0423
⇒ 𝑥2 = 5.2955 − = 5.2915
10.591
Third approximation:
𝑓 𝑥2
𝑥3 = 𝑥2 − , where 𝑥2 = 5.2915, 𝑓 5.2915 = −0.00003, 𝑓′ 5.2915 = 10.583
𝑓′ 𝑥2
−0.00003
⇒ 𝑥3 = 5.2915 − = 5.2915
10.583
Page | 12
𝑓 𝑥𝑛
By Newton-Raphson method 𝑥𝑛 +1 = 𝑥𝑛 −
𝑓′ 𝑥𝑛
First approximation:
𝑓 𝑥0
𝑥1 = 𝑥0 − , where 𝑥0 = 𝜋, 𝑓 𝜋 = −1, 𝑓′ 𝜋 = −3.1416
𝑓′ 𝑥0
−1
⇒ 𝑥1 = 3.1416 − = 2.8233
−3.1416
Second approximation:
𝑓 𝑥1
𝑥2 = 𝑥1 − , where 𝑥1 = 2.8233, 𝑓 2.8233 = −0.0662, 𝑓′ 2.8233 = −2.6815
𝑓′ 𝑥1
−0.0662
⇒ 𝑥2 = 2.8233 − = 2.7986
−2.6815
Third approximation:
𝑓 𝑥2
𝑥3 = 𝑥2 − , where 𝑥2 = 2.798, 𝑓 2.7986 = −0.0006, 𝑓′ 2.7986 = −2.6356
𝑓′ 𝑥2
−0.0006
⇒ 𝑥3 = 2.7986 − = 2.7984
−2.6356
Hence a root of the equation 𝑥 sin 𝑥 + cos 𝑥 = 0 correct to three decimal places is
2.7984
5
Example 12 Use Newton Raphson method to derive a formula to find 𝑁 , 𝑁𝜖𝑅.
5
Hence evaluate 43 correct to 3 decimal places.
5
Solution: 𝑥 = 𝑁 ⇒ 𝑥5 − 𝑁 = 0
𝑓 𝑥 = 𝑥5 − 𝑁
⇒ 𝑓′ 𝑥 = 5𝑥 4
𝑓 𝑥𝑛
By Newton-Raphson method 𝑥𝑛 +1 = 𝑥𝑛 −
𝑓′ 𝑥𝑛
𝑥 𝑛5 −𝑁 4 𝑁
⇒ 𝑥𝑛+1 = 𝑥𝑛 − = 𝑥𝑛 +
5𝑥 𝑛4 5 5𝑥 𝑛4
5
To evaluate 43, putting 𝑁 = 43 , ∴Newton-Raphson formula is given by
4 43
𝑥𝑛+1 = 𝑥𝑛 +
5 5𝑥 𝑛4
Page | 13
Second approximation:
4 43
𝑥2 = 𝑥1 + , where 𝑥1 = 2.1375
5 5𝑥 14
4(2.1375) 43
⇒ 𝑥2 = + = 2.1220
5 5(2.1375)4
Third approximation:
4 43
𝑥3 = 𝑥2 + , where 𝑥2 = 2.1220
5 5𝑥 24
4(2.1220) 43
⇒ 𝑥3 = + = 2.1217
5 5(2.1220)4
Fourth approximation:
4 43
𝑥4 = 𝑥3 + , where 𝑥3 = 2.1217
5 5𝑥 34
4(2.1217) 43
⇒ 𝑥4 = + = 2.1217
5 5(2.1217)4
5
Hence value of 43 correct to four decimal places is 2.1217
5.2.3.1 Generalized Newton’s Method for Multiple Roots
Result: If 𝛼 is a root of equation 𝑓 𝑥 = 0 with multiplicity 𝑚, then it is also a root of
equation 𝑓′ 𝑥 = 0 with multiplicity (𝑚 − 1) and also of the equation 𝑓′′ 𝑥 = 0 with
multiplicity (𝑚 − 1) and so on.
For example (𝑥 − 1)3 = 0 has ‘1’ as a root with multiplicity 3
3(𝑥 − 1)2 = 0 has ‘1’ as the root with multiplicity 2
6(𝑥 − 1) = 0 has ‘1’ as the root with multiplicity 1
𝑓 𝑥𝑛 𝑓′ 𝑥𝑛 𝑓′′ 𝑥𝑛
∴ The expressions 𝑥𝑛 − 𝑚 , 𝑥𝑛 − (𝑚 − 1) ′′ , 𝑥𝑛 − (𝑚 − 2) are
𝑓′ 𝑥𝑛 𝑓 𝑥𝑛 𝑓′′′ 𝑥𝑛
equivalent
Generalized Newton’s method is used to find repeated roots of an equation as is given as:
If 𝛼 be a root of equation 𝑓 𝑥 = 0 which is repeated 𝑚 times,
𝑓 𝑥𝑛 𝑓′ 𝑥𝑛
Then 𝑥𝑛+1 = 𝑥𝑛 − 𝑚 ~ 𝑥𝑛 − (𝑚 − 1)
𝑓′ 𝑥𝑛 𝑓′′ 𝑥𝑛
Page | 14
Let the initial approximation 𝑥0 = 0.7
First approximation:
2𝑓 𝑥0 𝑓′ 𝑥0
𝑥1 = 𝑥0 − Also 𝑥1 = 𝑥0 −
𝑓′ 𝑥0 𝑓′′ 𝑥0
0.306 −0.93
⇒ 𝑥1 = 0.7 − = 1.0290 And 𝑥1 = 0.7 − = 1.1227
−0.93 2.2
1.029+1.1227
∴ 𝑥1 = = 1.0759, 𝑓(𝑥1 ) = .012
2
Second approximation:
2𝑓 𝑥1 𝑓′ 𝑥1
𝑥2 = 𝑥1 − Also 𝑥2 = 𝑥1 −
𝑓′ 𝑥1 𝑓′′ 𝑥1
0.0239 0.3209
⇒ 𝑥2 = 1.0759 − = 1.001 And 𝑥2 = 1.0759 − = 1.004
0.3209 4.4554
1.001+1.004
∴ 𝑥2 = = 1.0025 , 𝑓(𝑥2 ) = .00001
2
Third approximation:
2𝑓 𝑥2 𝑓′ 𝑥2
𝑥3 = 𝑥2 − Also 𝑥3 = 𝑥2 −
𝑓′ 𝑥2 𝑓′′ 𝑥2
0.00003 0.0100
⇒ 𝑥3 = 1.0025 − = 0.995 And 𝑥3 = 1.0025 − = 1.0000
0.0100 4.015
0.995+1.000
∴ 𝑥3 = = 0.9975 , 𝑓(𝑥3 ) = .00001
2
Using ① and ② in ③
𝑓 𝛼 +∈𝑛
⇒ 𝛼 +∈𝑛+1 = 𝛼 +∈𝑛 −
𝑓′ 𝛼+∈𝑛
Page | 15
∈𝑛 𝑓 ′ 𝛼+∈𝑛 −𝑓(𝛼+∈𝑛 )
⇒∈𝑛+1 =
𝑓 ′ (𝛼+∈𝑛 )
∈ 2
∈𝑛 𝑓 ′ 𝛼 +∈𝑛 𝑓 ′′ 𝛼 + … − 𝑓 𝛼 +∈𝑛 𝑓 ′ 𝛼 + 𝑛 𝑓 ′′ 𝛼 +⋯
2!
⇒∈𝑛+1 = ′ ′′
By Taylor’s expansion
𝑓 𝛼 +∈𝑛 𝑓 𝛼 + …
∈ 2
∈𝑛 2 𝑓 ′′ 𝛼 − 𝑛 𝑓 ′′ 𝛼 +⋯
2!
⇒∈𝑛+1 = ∈𝑛 𝑓 ′′ 𝛼
∵𝑓 𝛼 =0
𝑓′ 𝛼 1+ ′ +⋯
𝑓 𝛼
−1
∈2𝑛 𝑓 ′′ (𝛼) ∈𝑛 𝑓 ′′ 𝛼
⇒∈𝑛+1 = +⋯ 1+ +⋯
2 𝑓 ′ (𝛼) 𝑓′ 𝛼
∈2𝑛 𝑓 ′′ (𝛼) ∈𝑛 𝑓 ′′ 𝛼
⇒∈𝑛+1 = +⋯ 1− +⋯
2 𝑓 ′ (𝛼) 𝑓′ 𝛼
∈2𝑛 𝑓 ′′ (𝛼)
⇒∈𝑛+1 = Neglecting higher order terms
2 𝑓 ′ (𝛼)
1 𝑓 ′′ (𝛼)
⇒∈𝑛+1 = 𝐾 ∈2𝑛 Where 𝑘 =
2 𝑓 ′ (𝛼)
Page | 16
5.3.1 Gauss-Jacobi’s Iteration Method
The concept of the Gauss- Jacobi’s iteration scheme is extremely simple with the
assumptions that the system has unique solution and diagonal elements are non-zeros.
Algorithm: Gauss-Jacobi’s iteration method
1. Take the system of linear equations given by ① after partial pivoting and solve
each equation in the system for the diagonal value of variables such that
1
𝑥= (𝑑1 − 𝑏1 𝑦 − 𝑐1 𝑧)
𝑎1
1
𝑦= (𝑑2 − 𝑎2 𝑥 − 𝑐2 𝑧) … ②
𝑏2
1
𝑧= (𝑑3 − 𝑎3 𝑥 − 𝑏3 𝑦)
𝑐3
Page | 17
Second Approximation:
1 1 1
𝑥2 = −1 + 2𝑦1 − 3𝑧1 , 𝑦2 = 2 + 3𝑥1 − 𝑧1 , 𝑧2 = (−3 + 2𝑥1 − 𝑦1 )
5 9 7
1
⇒ 𝑥2 = −1 + 2 0.222 − 3(−0.429 ) = 0.146
5
1
𝑦2 = 2 + 3(−0.2 + 0.429) = 0.203
9
1
𝑧2 = −3 + 2 −0.2 − 0.222 = −0.517
7
Third Approximation:
1 1 1
𝑥3 = −1 + 2𝑦2 − 3𝑧2 , 𝑦3 = 2 + 3𝑥2 − 𝑧2 , 𝑧3 = (−3 + 2𝑥2 − 𝑦2 )
5 9 7
1
⇒ 𝑥3 = −1 + 2 0.203 − 3(−0.517 ) = 0.191
5
1
𝑦3 = 2 + 3(0.146 + 0.517) = 0.328
9
1
𝑧3 = −3 + 2 0.146 − 0.203 = −0.416
7
Fourth Approximation:
1 1 1
𝑥4 = −1 + 2𝑦3 − 3𝑧3 , 𝑦4 = 2 + 3𝑥3 − 𝑧3 , 𝑧4 = (−3 + 2𝑥3 − 𝑦3 )
5 9 7
1
⇒ 𝑥4 = −1 + 2 0.328 − 3(−0.416 ) = 0.181
5
1
𝑦4 = 2 + 3(0.191 + 0.416) = 0.332
9
1
𝑧4 = −3 + 2 0.191 − 0.328 = −0.421
7
Fifth Approximation:
1 1 1
𝑥5 = −1 + 2𝑦4 − 3𝑧4 , 𝑦5 = 2 + 3𝑥4 − 𝑧4 , 𝑧5 = (−3 + 2𝑥4 − 𝑦4 )
5 9 7
1
⇒ 𝑥5 = −1 + 2 0.332 − 3(−0.421 ) = 0.185
5
1
𝑦5 = 2 + 3(0.181 + 0.421) = 0.329
9
1
𝑧5 = −3 + 2 0.181 − 0.332 = −0.424
7
Sixth Approximation:
1 1 1
𝑥6 = −1 + 2𝑦5 − 3𝑧5 , 𝑦6 = 2 + 3𝑥5 − 𝑧5 , 𝑧6 = (−3 + 2𝑥5 − 𝑦5 )
5 9 7
1
⇒ 𝑥6 = −1 + 2 0.329 − 3(−0.424 ) = 0.186
5
1
𝑦6 = 2 + 3(0.185 + 0.424) = 0.331
9
1
𝑧6 = −3 + 2 0.185 − 0.329 = −0.423
7
Page | 18
Values of variables have been stabilized, ∴ approximate solution is given by
𝑥 = 0.186, 𝑦 = 0.331and 𝑧 = −0.423
Example 15 Compute 4 iterations to find an approximate solution of the given system of
equations using Gauss Jacobi's method.
𝑥 + 𝑦 + 5𝑧 = −1
5𝑥 − 𝑦 + 𝑧 = 10
2𝑥 + 4𝑦 = 12
Solution: Rearranging the given equations by partial pivoting
5𝑥 − 𝑦 + 𝑧 = 10
2𝑥 + 4𝑦 = 12
𝑥 + 𝑦 + 5𝑧 = −1
Rewriting in general form as given in ③
1
𝑥𝑛 +1 = (10 + 𝑦𝑛 − 𝑧𝑛 )
5
1
𝑦𝑛 +1 = 12 − 2𝑥𝑛
4
1
𝑧𝑛+1 = (−1 − 𝑥𝑛 − 𝑦𝑛 )
5
Taking 𝑥0 = 𝑦0 = 𝑧0 = 0 as initial approximation
First Approximation:
10 12 1
𝑥1 = = 2 , 𝑦1 = = 3 , 𝑧1 = −
5 4 5
Second Approximation:
1 1 1
𝑥2 = 10 + 𝑦1 − 𝑧1 , 𝑦2 = 12 − 2𝑥1 , 𝑧2 = (−1 − 𝑥1 − 𝑦1 )
5 4 5
1 1 1 1
⇒ 𝑥2 = 10 + 3 + , 𝑦2 = 12 − 4 , 𝑧2 = (−1 − 2 − 3)
5 5 4 5
∴ 𝑥2 = 2.64 , 𝑦2 = 2 , 𝑧2 = −1.2
Third Approximation:
1 1 1
𝑥3 = 10 + 𝑦2 − 𝑧2 , 𝑦3 = 12 − 2𝑥2 , 𝑧3 = (−1 − 𝑥2 − 𝑦2 )
5 4 5
1 1 1
⇒ 𝑥3 = 10 + 2 + 1.2 , 𝑦3 = 12 − 2(2.64) , 𝑧3 = (−1 − 2.64 − 2)
5 4 5
∴ 𝑥3 = 2.64 , 𝑦3 = 1.68 , 𝑧3 = −0.928
Fourth Approximation:
1 1 1
𝑥4 = 10 + 𝑦3 − 𝑧3 , 𝑦3 = 12 − 2𝑥3 , 𝑧3 = (−1 − 𝑥3 − 𝑦3 )
5 4 5
1 1 1
⇒ 𝑥4 = 10 + 1.68 + 0.928 , 𝑦4 = 12 − 2(2.64) , 𝑧4 = (−1 − 2.64 − 1.68)
5 4 5
Page | 19
∴ 𝑥4 = 2.52 , 𝑦4 = 1.68 , 𝑧4 = −1.064
Approximate solution after 4 iterations is given by 𝑥 = 2.52, 𝑦 = 1.68, 𝑧 = −1.064
Page | 20
1
𝑧2 = −3 + 2 0.146 − 0.319 = −0.432
7
Third Approximation:
1 1 1
𝑥3 = −1 + 2𝑦2 − 3𝑧2 , 𝑦3 = 2 + 3𝑥3 − 𝑧2 , 𝑧3 = (−3 + 2𝑥3 − 𝑦3 )
5 9 7
1
⇒ 𝑥3 = −1 + 2 0.319 − 3(−0.432 ) = 0.187
5
1
𝑦3 = 2 + 3(0.187 + 0.432) = 0.333
9
1
𝑧3 = −3 + 2 0.187 − 0.333 = −0.423
7
Fourth Approximation:
1 1 1
𝑥4 = −1 + 2𝑦3 − 3𝑧3 , 𝑦4 = 2 + 3𝑥4 − 𝑧3 , 𝑧4 = (−3 + 2𝑥4 − 𝑦4 )
5 9 7
1
⇒ 𝑥4 = −1 + 2 0.333 − 3(−0.423 ) = 0.187
5
1
𝑦4 = 2 + 3(0.187 + 0.423) = 0.332
9
1
𝑧4 = −3 + 2 0.187 − 0.332 = −0.423
7
Values of variables have been stabilized, ∴ approximate solution is given by
𝑥 = 0.187, 𝑦 = 0.332 and 𝑧 = −0.423
Clearly numbers of iterations for the solution to converge in Gauss Seidal’s
method are much less than Gauss Jacobi’s method.
Exercise 5A
1. Find the real root of the equation 𝑥 3 − 2𝑥 − 5 = 0 correct to three decimal
places using Bisection method.
2. Perform three iterations to find root of the equation 𝑥𝑒 𝑥 − cos 𝑥 = 0 using
Regula-Falsi method.
3. Find the real root of the equation 𝑥 3 − 3𝑥 − 5 = 0 correct to three decimal
places using Newton- Raphson method.
4. Solve the system of equations:
10𝑥1 − 2𝑥2 − 𝑥3 − 𝑥4 = 3
2𝑥1 − 10𝑥2 + 𝑥3 + 𝑥4 = −15
𝑥1 + 𝑥2 − 10𝑥3 + 2𝑥4 = −27
𝑥1 + 𝑥2 + 2𝑥3 − 10𝑥4 = 9
using Gauss- Jacobi method. Compute results for 2 iterations.
5. Solve the system of equations given in Q4 upto 2 iterations, using Gauss-
Seidal method.
Page | 21
Answers
1. 2.0944
2. 0.494015
3. 2.279
4. 𝑥1 = 0.78, 𝑥2 = 1.74, 𝑥3 = 2.7, 𝑥4 = −0.18 taking initial
approximations as zero.
5. 𝑥1 = 0.8869, 𝑥2 = 1.9523, 𝑥3 = 2.9566, 𝑥4 = −0.0248 taking
initial approximations as zero.
Page | 22