Lecture - 19 & 20
Lecture - 19 & 20
Example: 𝑥 2 + 2𝑥 − 1 = 0.
Solution of Equation: The solutions of 𝑓(𝑥) are those values of 𝑥 for which 𝑓(𝑥) is zero.
Geometrically if the graph of 𝑓(𝑥) crosses the 𝑥 − 𝑎𝑥𝑖𝑠 at a point 𝑥 = 𝑎, then 𝑥 = 𝑎 is root
of 𝑓(𝑥) = 0. if 𝑓(𝑎) = 0. So finding the solution of an equation 𝑓(𝑥) = 0. We mean to find
the roots of 𝑓(𝑥).
∴ 𝑓(𝑥) = 𝑥 − 1
There are many methods for the solution of equation of the form 𝑓(𝑥) = 0. They are,
i) Bisection Method
Bisection Method: We know that if a function 𝑓(𝑥) is continuous between 𝑎 and b and if 𝑓(𝑎)
and 𝑓(𝑏) are of opposite signs. Then there exists at least one root between 𝑎 and b. Let 𝑓(𝑎)
be negative and 𝑓(𝑏) be positive. Also let the approximate value of the root is given by 𝑥0 =
𝑎+𝑏
. If 𝑓(𝑥0 ) = 0,then it ensures that 𝑥0 is a root of the equation 𝑓(𝑥) = 0.If 𝑓(𝑥0 ) ≠ 0.Then
2
the root either lies between 𝑥0 and b or between 𝑥0 and 𝑎 depending on whether 𝑓(𝑥0 ) is
negative or positive. Then again we bisect the new interval and repeat the process until the root
is obtained to the desired accuracy.
Let the function 𝑦 = 𝑓(𝑥) represent the curve PQRSTL, cuts the x-axis at R. So the abscissa
of the point R, that is OR is a root of 𝑓(𝑥)=0.
Here x-Coordinates of P and L are a and b respectively .According to graph f(a).f(b) < 0.
𝑎+𝑏
First approximation 𝑥0 = (x-coordinate of T)
2
Let 𝑓(𝑥) = 𝑥 3 − 2𝑥 − 5
Here, 𝑓(2) = 23 − 2 × 2 − 5 = −1
And 𝑓(3) = 33 − 2 × 3 − 5 = 16
2+3
So the root lies between 2 and 3 and we take 𝑥0 = = 2.5
2
Here 𝑓(𝑥) = 𝑓(2.5) = 5.6250 this is positive. So the root lies between 2 and 2.5 and we get
2 + 2.5
x1 = = 2.25
2
Here 𝑓(𝑥1 ) = 𝑓(2.25) = 1.890625.
𝑛 𝑎 𝑏 𝑥 𝑓(𝑥)
1 2 3 2.5 5.6250
2 2 2.5 2.25 1.890625
3 2 2.25 2.125 0.3457
4 2 2.125 2.0625 -0.3513
5 2.0625 2.125 2.09375 -0.0089
6 2.09375 2.125 2.10938 0.1668
7 2.09375 2.10938 2.10156 0.07856
8 2.09375 2.10156 2.09766 0.03471
9 2.09375 2.09766 2.09570 0.01286
10 2.09375 2.09570 2.09473 0.00135
11 2.09375 2.09473 2.09473 0.0035
Example: Using bisection method find a positive root of the equation 𝑥𝑒 𝑥 = 1 Correct to 3
decimal Places.
0+1
𝑥0 = = 0.5
2
and 𝑓(𝑥0 ) = 𝑓(0.5) = −0.1756
𝑛 𝑎 𝑏 𝑥 𝑓(𝑥)
1 0 1 0.5 −𝑣𝑒
2 0.5 1 0.75 +𝑣𝑒
3 0.5 0.75 0.625 +𝑣𝑒
Problem (Home works): Use Bisection method find a real root of the following equations
i) 𝑥 4 + 𝑥 2 − 80 = 0
ii) 𝑥 2 + 𝑙𝑛𝑥 − 2 = 0
iii) 𝑠𝑖𝑛𝑥 = 1 − 𝑥 2
iv) 𝑥 3 − 2 𝑥 2 − 4 = 0
v) 𝑥 𝑠𝑖𝑛𝑥 = 1
vi) 𝑥 3 − 3𝑥 − 5 = 0
vii) 𝑥 2 − 2𝑥 − 2 = 0
viii) 𝑥 3 − 9𝑥 + 1 = 0
ix) 𝑙𝑛𝑥 – 𝑥 + 3 = 0
x) 𝑥 𝑒 𝑥 = 1
xi) 𝑠𝑖𝑛2 𝑥 = 𝑥 2 − 1
xii) 𝑥 2 − 2𝑥 − 3 = 0
Newton-Raphson Method:
Derive Newton’s interactive Method to find an approximate root of an equation 𝑓(𝑥) = 0.
Sol: Let 𝑥0 be an approximate roots of the equation 𝑓(𝑥) = 0 and let 𝑥1 = 𝑥0 + ℎ be the
correct root of 𝑓(𝑥) = 0. So that 𝑓(𝑥0 + ℎ) = 0.
ℎ2 ′′
𝑓(𝑥0 + ℎ) = 𝑓(𝑥0 ) + ℎ𝑓 ′ (𝑥0 ) + 𝑓 (𝑥0 ) + ⋯ … … … = 0
2!
Neglecting the second and higher order derivatives .we get
𝑓(𝑥0 ) + ℎ𝑓 ′ (𝑥0 ) = 0
⇒ ℎ𝑓 ′ (𝑥0 ) = −𝑓(𝑥0 )
𝑓(𝑥0 )
⇒ℎ=−
𝑓 ′ (𝑥0 )
The improved value of the root is
𝑥1 = 𝑥0 + ℎ
𝑓(𝑥 )
=> 𝑥1 = 𝑥0 − 𝑓′ (𝑥0 )
0
Geometrically, the method consists in replacing the part of the curve between the point
[ 𝑥0 , 𝑓(𝑥0 )] and x-axis by means of the tangent to the curve at the point and is described
graphically in the above figure. This method can be used for solving both algebraic and
transcendental equations and it can also be used when the roots are complex.
𝑓(𝑥𝑛 )
𝑥𝑛+1 = 𝑥𝑛 −
𝑓 ′ (𝑥𝑛 )
𝑥𝑛3 − 2𝑥𝑛 − 5
⇒ 𝑥𝑛+1 = 𝑥𝑛 −
3𝑥𝑛2 − 2
𝑛 𝑥𝑛 𝑓(𝑥𝑛 ) 𝑥𝑛+1
0 2 -1 2.10
1 2.10 0.061 2.09456
2 2.09456 0.00095 2.09455
So the required root is 2.0945.
Example: Use Newton-Raphson method to find a root the equation 𝑥 𝑠𝑖𝑛𝑥 + 𝑐𝑜𝑠𝑥 = 0.
Solution:
= 𝑥 𝑐𝑜𝑠𝑥
𝑓(𝑥𝑛 )
𝑥𝑛+1 = 𝑥𝑛 −
𝑓 ′ (𝑥𝑛 )
𝑥𝑛 𝑠𝑖𝑛𝑥 + 𝑐𝑜𝑠𝑥𝑛
= 𝑥𝑛 −
𝑥𝑛 𝑐𝑜𝑠𝑥𝑛
Take 𝑥0 = 𝜋
n 𝑥𝑛 f(𝑥𝑛 ) 𝑥𝑛+1
0 3.1416 -1.0 2.8233
1 2.8233 -0.0660 2.7986
Problem(Home works): Use Newton’s Raphson method find a real root of the following
equations
i) 𝑥 3 + 𝑥 2 − 80 = 0
ii) 𝑥 2 + 𝑙𝑛𝑥 − 2 = 0
iii) 𝑠𝑖𝑛2 𝑥 = 𝑥 2 − 1
iv) 𝑥 3 − 2 𝑥 2 − 4 = 0
v) 𝑒 𝑥 − 3𝑥 = 0
vi) 𝑥 3 − 3𝑥 − 5 = 0
vii) 𝑥 2 − 2𝑥 − 2 = 0
viii) 𝑥 3 − 9𝑥 + 1 = 0
ix) 𝑙𝑛𝑥 – 𝑥 + 3 = 0
x) 𝑥 𝑒 𝑥 = 1
Iterative method:
In this method for finding the root of the equation 𝑓(𝑥) = 0 it expressed in the formula 𝑥 =
𝜑(𝑥).
This method is converges conditionally and the condition is that |𝜑′(𝑥)| < 1 in the
neighborhood of the real root 𝑥 = 𝑎.
Example: Find the real root of the equation 𝑥 3 + 𝑥 2 − 1 = 0 on the interval [𝑜, 1] with an
accuracy of 10−4 .
𝑥3 + 𝑥2 − 1 = 0
Solution: Given 𝑥 3 + 𝑥 2 − 1 = 0
⇒ 𝑥3 + 𝑥2 = 1
Rewrite the equation we get, 𝑥 =
1
. ⇒ 𝑥 2 (𝑥 + 1) = 1
√𝑥+1 1
⇒ 𝑥2 =
1 1 1 𝑥+1
Then 𝜑(𝑥) = and 𝜑 ′(𝑥) = − 2 3 . 1
√𝑥+1 (𝑥+1)2 ∴𝑥=
√𝑥 + 1
1 1
Here|𝜑 ′ (𝑥)| = |− 2 3 | < 1.
(𝑥+1)2
𝑛 𝑥𝑛 𝑥𝑛+1 = 𝜑(𝑥𝑛 )
0 0.75 0.7559289
1 0.7559289 0.7546517
2 0.7546517 0.7549263
Example: Find the real roots of the equations 2𝑥 = 𝑐𝑜𝑠𝑥 + 3 correct to three deceimal
places by using Iterative method.
𝑐𝑜𝑠𝑥 +3
Here, 𝜑(𝑥) =
2
𝑠𝑖𝑛𝑥
So that, 𝜑 ′(𝑥) = − 2
𝑠𝑖𝑛𝑥
Here, |𝜑 ′ (𝑥)| = |− | < 1.
2
𝜋
So the Iterative method is applicable and we take 𝑥0 = = 1.5
2
𝑛 𝑥𝑛 𝑥𝑛+1 = 𝜑(𝑥𝑛 )
0 𝜋 1.5
2
1 1.5 1.53536
2 1.53536 1.51771
3 1.51771 1.52653
4 1.52653 1.52212
5 1.52212 1.52432
6 1.52432 1.523229
7 1.523229 1.523774
So the required root is 1.523 .
Example: Use Iterative method to find a real root of the equation 𝑆𝑖𝑛2 𝑥 = 𝑥 2 − 1
n 𝑥𝑛 𝑥𝑛+1 = 𝜑(𝑥𝑛 )
0 𝜋 1.00
1 1.00 1.306932824
2 1.306932824 1.38895574
3 1.38895574 1.402730064
4 1.402730064 1.404285826
5 1.404285826 1.404467709
So the required root is 1.404 correct to 3 decimal places.
1
So, 𝑥 = (5 − 𝑥)3
1
Let (𝑥) = (5 − 𝑥)3 , Again let 𝑥0 = 5 𝑡ℎ𝑒𝑛 𝑤𝑒 ℎ𝑎𝑣𝑒 𝑡ℎ𝑒 𝑓𝑜𝑙𝑙𝑜𝑤𝑖𝑛𝑔 𝑡𝑎𝑏𝑙𝑒
𝑛 𝑥𝑛 𝑥𝑛+1 = 𝜑(𝑥𝑛 )
0 5 0
1 0 1.709975947
2 1.709975947 1.487303812
3 1.487303812 1.520128133
4 1.520128133 1.515378371
5 1.515378371 1.516067517
6 1.516067517 1.51967567
7 1.51967567 1.515982064
So the required root is 1.5159 .
Problem: Use Newton’s Iterative method find a real root of the following equations
(Home works)
i) 𝑥 3 + 𝑥 2 − 80 = 0
ii) 𝑥 2 + 𝑙𝑛𝑥 − 2 = 0
iii) 𝑠𝑖𝑛2 𝑥 = 𝑥 2 − 1
iv) 𝑥 3 − 2 𝑥 2 − 4 = 0
v) 3𝑥 − 𝑠𝑖𝑛𝑥 − 1 = 0
vi) 𝑥 3 − 5𝑥 + 3 = 0
vii) 𝑥 2 + 2𝑥 + 3 = 0
viii) 𝑥 3 − 9𝑥 + 1 = 0
ix) 𝑙𝑛𝑥 – 𝑥 + 3 = 0
x) 𝑥 𝑒 𝑥 = 3
This is the oldest method for finding the real root of an equation. It is closely similar to the
bisection method. In this method we choose two points 𝑥0 𝑎𝑛𝑑 𝑥1 such that 𝑓(𝑥0 ) 𝑎𝑛𝑑 𝑓(𝑥1 )
are opposite sign since the graph of 𝑦 ′ = 𝑓(𝑥) crosses the 𝑥-axis between those two points, a
point must lies between these points. We know that the equation of the chord joining the two
points [𝑥0 , 𝑓(𝑥0 )] is
𝑥−𝑥0 𝑦−𝑓(𝑥0 )
= 𝑓(𝑥 … … … … … … (𝑖)
𝑥0 −𝑥1 0 )−𝑓(𝑥1 )
Here we take the point of intersection of the chord with the 𝑥-axis as an approximating of the
chord with the 𝑥 -axis as an approximation to the root. In the present case the point of
intersection is given by putting 𝑦 = 0 in (1). Thus we get
𝑥−𝑥0 0−𝑓(𝑥0 )
= 𝑓(𝑥
𝑥0 −𝑥1 0 )−𝑓(𝑥1 )
(𝑥 −𝑥 )
⇒ 𝑥 − 𝑥0 = −𝑓(𝑥0 )×𝑓(𝑥 1)−𝑓(𝑥
0
1 0)
(𝑥1 −𝑥0 )
⇒ 𝑥 = 𝑥0 − 𝑓(𝑥0 )×𝑓(𝑥
1 )−𝑓(𝑥0 )
Hence the first approximation to the root of the equation is given by,
𝑓(𝑥0 )
𝑥2 = 𝑥0 − 𝑓(𝑥 (𝑥1 − 𝑥0 )…………………………….(ii)
1 )−𝑓(𝑥0 )
Now if 𝑓(𝑥2 ) 𝑎𝑛𝑑 𝑓(𝑥0 ) are of apposite signs the root lies between 𝑥0 and 𝑥2 replace
𝑥1 𝑏𝑦 𝑥2 in (ii) and obtain the next approximation. Otherwise replace 𝑥0 𝑏𝑦 𝑥2 and obtain the
next approximations.This process is repeated till the root is obtained to the desired accuracy.
The following figure gives representation of the method.
Example: Use false method find a real root of the equation 𝑥 3 − 2𝑥 − 5 = 0 correct to two
decimal places.
Solution:
Given 𝑓(𝑥) = 𝑥 3 − 2𝑥 − 5
−1 1
So we get 𝑥2 = 2 − 16−(−1) (3 − 2) = 2 + 17 = 2.059
= 2.0897
𝑓( 𝑥4 )
∴ 𝑥5 = 𝑥4 − ( 𝑥 − 𝑥4 )
𝑓( 𝑥1 ) − 𝑓( 𝑥4 ) 1
−0.054
= 2.0897— (3 − 2.0897)
16— 0.054
= 2.0928
Solution:
−2
So we get, 𝑥2 = 1 − 1−(−2) (0 − 1)
1
=
3
= 0.333333
−0.2963
= 0.333333 − 1+0.2963 (0 − 0.333333) = 0.25714
−0.011558
𝑥4 = 0.25714 − 1+0.011558 (0 − 0.25714)
= 0.25420
−0.0003742
𝑥4 = 0.25420 − (0 − 0.25420)
1+0.0003742
= 0.25410
Problem: Use false position method find a real root of the following equations
𝑖) 𝑥 2 − 2𝑥 − 2 = 0
𝑖𝑖) 𝑥 3 − 2 𝑥 2 − 4 = 0
𝑖𝑖𝑖) 𝑥 2 + 𝑙𝑛𝑥 − 2 = 0
iv) 𝑠𝑖𝑛𝑥 = 1 − 𝑥 2
v) 2𝑥 = 𝑐𝑜𝑠𝑥 + 2
vi) 𝑥 3 − 5𝑥 + 3 = 0
vii) 𝑥 2 + 2𝑥 + 3 = 0
viii) 𝑥 3 − 9𝑥 + 1 = 0
ix) 𝑙𝑛𝑥 – 𝑥 + 3 = 0
x) 𝑥 𝑒 𝑥 = 3