1-Module 4 Numerical Methods-Regular Falsi and Newton Raphson Method
1-Module 4 Numerical Methods-Regular Falsi and Newton Raphson Method
Numerical Methods
Numerical Solution of Polynomial & Transcendental Equations
Polynomial Equations:
Equations involving algebraic quantities like x,x2, x3 etc. are called as Polynomial or algebraic equations
Example: (i) x3 – 4x – 9 = 0 (ii) x4 + x3 = 80
Transcendental Equations:
Equations involving non-algebraic quantities like ex, log x, sin x, tan x etc. are called as Transcendental
Equations
Example: (i) xex – 2 = 0 (ii) xlog x – 12 = 0 (iii) tan x = 2x
Numerical methods of finding approximate roots of the given equation is a repetitive type of
process known as iteration process.
Note: If f(x) is a real valued continuous function of the real variable x we have the following fundamental property. If
there exists 2 values a,b such that f(x) has opposite signs , say f(a) < 0 , f(b) > 0 then there always exist at least 1 real
root in the interval (a,b).This property is useful in locating an initial approximation for a real root of f(x)=0.
Department of Mathematics
1
Acharya Institute of Technology
We will discuss two numerical iterative methods:
• Regula-Falsi Method
• Newton-Raphson Method
The formula to find the first approximation x1 to the real root lying in (a,b) is
x1 = a f(b) – b f(a)
f(b) – f(a)
Note: The process is continued till we get consistency in 2 consecutive approximations.
Department of Mathematics
2
Acharya Institute of Technology
1.Find real root of the equation x3 -2x – 5 = 0 correct to 3 decimal places.
Let f(x) = x3 -2x – 5 II step: f(2.0942)=(2.0942)3 – 2(2.0942) – 5 = -0.00392<0
f(0) = -5, f(1) = -6, f(2) = -1<0, f(3) = 16>0. The root lies in (2.0942,2.1)
Real root lies in (2,3).
a = 2.0942. f(a) = -0.00392
It is observed that the value of f(x) at x = 2 being -1 is nearer to b = 2.1. f(b) = 0.061
zero compared to f(3) = 16. Hence, we expect the root in the
neighborhood of 2.
Substituting in the RHS of (1) we obtain the second
f(2.1) = (2.1)3 -2(2.1)-5=0.061>0 approximation.
The root lies in (2,2.1)
x2 = (2.0942)(0.061)– (2.1)(-0.00392) = 2.09455
I step: a=2, f(a)=f(2)=-1 0.061-(-0.00392)
b=2.1,f(b)=f(2.1)=0.061 x1 and x2 are close enough. x2 is a better approximation than x1.
First approximation, x1 = a f(b) – b f(a)
f(b) – f(a) …. (1)
x1= 2(0.061)-(2.1)(-1) = 2.0942 Thus the required approximate root correct to 3 decimal places
is 2.095
0.061-(-1)
Department of Mathematics 3
Acharya Institute of Technology
2.Compute the real root of x log10 x-1.2=0,correct to 4 decimal places.
Let f(x)=xlog10 x-1.2 a = 2.7404 f(a) = -0.00021
f(1)=-1.2 , f(2)=-0.6 ,f(3)=0.23>0 b = 2.8 f(b)= 0.052
The real root lies in (2,3) and from the values of f(x) at x=2,3 Substituting in (1)
we expect the root in the neighborhood of 3.
x2 = (2.7404)(0.052) + (2.8)(0.00021) = 2.7406
f(2.7)=2.7 log10 2.7 – 1.2 = -0.0353
0.052+0.00021
f(2.8)= 2.8 log10 2.8 – 1.2 = 0.052
The root lies in (2.7,2.8)
III Iteration: f(2.7406) = -0.00004<0
The root lies in (2.7406,2.8)
I Iteration: a= 2.7 f(a) = -0.0353
a = 2.7406 f(a) = -0.00004
b= 2.8 f(b) = 0.052
b = 2.8 f(b)= 0.052
x1 = a f(b) – b f(a)
Substituting in (1)
f(b) – f(a) ….(1)
x1 = (2.7)(0.052) – (2.8)(-0.0353) = 2.7404
x3 = (2.7406)(0.052) + (2.8)(0.00004) = 2.740646
0.052+0.0353
0.052+0.00004
Department of Mathematics
4
Acharya Institute of Technology
3.Compute the fourth root of 12 correct to 3 decimal places
4
Let x = 12 x4 = 12 or x4 - 12 = 0 a = 1.8593 f(a) = -0.0492
f(x) = x4 - 12 b = 1.9 f(b)= 1.0321
f(0) = -12<0 ,f(1) = -11<0 ,f(2) = 4>0
Real root of f(x)=0 lies in (1,2) and will be in the neighborhood of Substituting in (1)
2.
x2 = 1.8612
f(1.7) = -3.6479 , f(1.8) = -1.5024<0, f(1.9) = 1.0321 >0
The root in the neighborhood of 2 lies in (1.8,1.9)
III Iteration: f(x2) = f(1.8612) = -0.00025<0
The root lies in (1.8612,1.9)
I Iteration: a= 1.8 f(a) = -1.5024
a = 1.8612 f(a) = -0.00025
b= 1.9 f(b) = 1.0321
b = 1.9 f(b)= 1.0321
x1 = a f(b) – b f(a)
f(b) – f(a) ….(1)
Substituting in (1)
x1 = (1.8)(1.0321) + (1.9)(1.5024) = 1.8593
x3 = 1.86121 ≈1.861
1.0321 + 1.5024
Department of Mathematics
5
Acharya Institute of Technology
4.Find the real root of the equation Cos x = 3x – 1 correct to three
decimals.
Let f(x) = Cos x + 1 - 3x
In radians f(0) = 2 > 0, f(1) = -1.46 < 0
Real root lies in (0,1).We expect the root in the neighborhood of 1
f(0.6) = 0.0253 > 0, f(0.7) = -0.3352 < 0
The root lies in (0.6,0.7)
Department of Mathematics 6
Acharya Institute of Technology
Newton Raphson Method
In this method we locate an approximate real root x0 of the given equation and improve its accuracy by
iterative process.
The first approximation to the root x0 is given by:
x1 = x0 – f(x0)
f ’ (x0)
The second approximation is obtained by replacing x0 by x1 in the RHS of the above expression.
The process is continued till we get consistency in 2 consecutive approximations.
Department of Mathematics
7
Acharya Institute of Technology
1.Find a real root of the equation x3 -2x-5=0 correct to 3 decimal places.
We shall find an interval (a,b) where a real root of the equation lies and then locate the approximate root.
f(x) = x3 -2x-5
f(0) = -5 < 0 , f(1) = -6 < 0 , f(2) = -1 < 0 , f(3) = 16 > 0
Real root lies in (2,3).It will be in the neighborhood of 2 and let the approximate root x0 = 2
The first approximation is given by
x1 = x0 – f(x0) = 2 – f(2)
f ’(x0) f ’(2)
We have f(x)= x3 -2x-5 , f′(x) = 3x2 – 2
x1 = 2 – (-1) = 2+ 1 = 2.1
3(22) – 2 10
x2 = x1 – f(x1) = 2.1 – f(2.1)
f ’(x1) f ’(2.1)
x2 = 2.1 – [ (2.1)3 – 2(2.1) -5 ] = 2.0946
[3(2.1)2 – 2 ]
Similarly x3 = 2.0946 – [ (2.0946)3 – 2(2.0946) -5 ] = 2.0946
[3(2.0946)2 – 2 ]
Thus the required approximate root correct to 3 decimal places is 2.095
Department of Mathematics
8
Acharya Institute of Technology
2.Find a real root of the equation x3+x2+3x+4=0 by performing 2
iterations.
Let f(x)= x3+x2+3x+4
f(0)= 4 , f(-1)= 1 , f(-2)= -6 < 0
Department of Mathematics
9
Acharya Institute of Technology
3.Find cube root of 37 correct to 3 decimal places
3
Let x = 37 x3 = 37 or x3 - 37=0
f(x) = x3-37
f(3) = -10 < 0 , f(4) = 27 > 0
Real root lies in (3,4). let x0 = 3 be the initial approximation.
f′(x) = 3x2
I Approximation:X1= x0 – f(x0) = 3 – f(3) = 3– (-10) = 3.3704
f ’(x0) f ’(3) 3(3)2
II Approximation: x2 = 3.3704 – f(3.3704)
f ’(3.3704)
x2= 3.3704 – [3.3704)3 -37] = 3.3327
3 (3.3704)2
x3 = 3.3327 – [3.3327)3 -37] = 3.3322
3 (3.3327)2
Again replacing 3.3322 in place of 3.3327 as earlier we obtain x4= 3.3322
3
Thus the required 37 correct to 3 decimal places is 3.332
Department of Mathematics
10
Acharya Institute of Technology
4.Find the real root of the equation xex – 2 = 0 correct to 3 decimal places