Program: B.Tech Subject Name: Mathematics-III Subject Code: BT-301 Semester: 3rd
Program: B.Tech Subject Name: Mathematics-III Subject Code: BT-301 Semester: 3rd
Tech
Subject Name: Mathematics-III
Subject Code: BT-301
Semester: 3rd
Downloaded from be.rgpvnotes.in
Module 1:
Numerical Methods Solution of polynomial and transcendental equations Bisection method,
Newton Raphson method and Regula Falsi method.
Fi ite diffe e es, Relatio et ee ope ato s, I te polatio usi g Ne to ’s fo a d a d
backward Difference fo ulae. I te polatio ith u e ual i te als: Ne to ’s di ided diffe e e
a d Lag a ge’s fo ulae.
Introduction
In this unit we will discuss one of the most basic problems in numerical analysis. The problem is called
f(x) = 0, for a given function f. Let f be a real-value function of a real variable. Any real number for
a root-finding problem and consists of finding values of the variable x (real) that satisfy the equation
which f() = 0 is called a root of that equation or a zero of f. We shall confine our discussion to
locating only the real roots of f(x), that is, locating non-real complex roots of f(x) = 0 will not be
discussed. This is one of the oldest numerical approximation problems. The procedures we will discuss
range from the classical Newton-Raphson method developed primarily by Isaac Newton over 300 years
ago to methods that were established in the recent past.
Myriads of methods are available for locating zeros of functions and in first section we discuss bisection
methods and fixed point method. In the second section, Chord Method for finding roots will be
discussed. More specifically, we will take up regula-falsi method (or method of false position),
Newton-Raphson method, and secant method. In section 3, we will discuss error analysis for iterative
methods or convergence analysis of iterative method.
We shall consider the problem of numerical computation of the real roots of a given equation
f(x) = 0
which may be algebraic or transcendental. It will be assumed that the function f(x) is continuously
differentiable a sufficient number of times. Mostly, we shall confine to simple roots and indicate the
iteration function for multiple roots in case of Newton Raphson method.
All the methods for numerical solution of equations discussed here will consist of two steps. First step
is about the location of the roots, that is, rough approximate value of the roots are obtained as initial
approximation to a root. Second step consists of methods, which improve the rough value of each
root.
A method for improvement of the value of a root at a second step usually involves a
process of successive approximation of iteration. In such a process of successive approximation a
sequence {Xn} = , , , … is ge erated y the method used starting with the initial approximation xo
of the root obtained in the first step such that the sequence {Xn} converges to as n . This xn is
called the nth approximation of nth iterate and it gives a sufficiently accurate value of the root .
at least one real root of the equation f(x) = 0 such that a < < b.
Theorem 1: If f(x) is continuous in the closed internal [a, b] and f(a) are of opposite signs, then there is
We shall not discuss the case of complex roots, roots of simultaneous equations nor shall we take up
cases when all roots are targeted at the same time, in this unit.
x to x2 or x1 accordingly. We may test sign of f(x) f(x2) for same sign or opposite signs.
[x1, x] and if they are of opposite signs then the root lies in the interval [x, x2]. Change
(4) Check the length of interval | x1 – x2 |. If an accuracy of say, two decimal places is required
then stop the process when the length of the interval is 0.005 or less. We may take the
x1 x 2
midvalue x as the root of f(x) = 0. The convergence of this method is very slow in
2
the beginning.
Example
Find the positive root of the equation x3 4x 2 10 0 by bisection method correct upto two
places of decimal.
Solution
f (x) x 3 4x 2 10 0
x 0 1 2 >2
f(x) 10 5 14
Sign f(x) + +
There is only one + ive root and it lies between 1 and 2. Let x1 = 1 and x2 = 2; at x = 1, f(x) is
x1 x 2
– ive and at x = 2, f(x) is + ive. We examine the sign of f(x) at x 1.5 and check whether
2
the root lies in the interval (1, 1.5) or (1.5, 2). Let us show the computations in the table below :
1.367 1.371
We can choose the root as x 1.369 .
2
Now we check the sign of f(x) and proceed like in the bisection method. That is, if f(x) has same sign as
f(x2) then root lies in the interval (x1, x) and if they have opposite signs, then it lies in the interval (x, x2).
See Figure 1.
(1) y = f (x)
(2)
x1 x1
x1 x
O x2
y f (x) 1.65
II-Iteration
Take points (1.26, – 1.65) and (2, 14)
1.26 14 2 ( 1.65)
x 1.34
14 1.65
y f (x) 0.41
III-Iteration
Take two points (1.34, – 0.41) and (2, 14)
1.34 14 2 ( 0.41)
x 1.36
14 0.41
y f (x) 0.086
IV-Iteration
Take two points (1.36, – 0.086) and (2, 14)
1.36 14 2 ( 0.086)
x 1.36
14 0.086
Example: Find the real root of the equation xlog10 � – 1.2=0 by method of False position, correct to
four decimal places.
Solution
f(x)=xlog10 � – 1.2=0
f(2)=-0.5979,f(3)=0.2313
Therefore root lies between 2 & 3
by method of False position
� − �( )
�1 =
� − �( )
�1 = 2.7210, � �1 = −0.01709
Now the roots lie between �1 = 2.7210 & 3, because the function are of opposite sign.
�2 = 2.7402, � �2 = 0.00038
Root lies between 2.7402 & 3,
�3 = 2.7406hence the root 2.7406
Let us suppose we want to find out the root of an equation f(x) = 0 while y = f(x) represents a
curve and we are interested to find the point where it cuts the x-axis. Let x = x0 be an initial
approximate value of the root close to the actual root. We evaluate y(x 0 ) f (x 0 ) y0 (say).
The point where the tangent cuts the x-axis (y = 0) is taken as the next estimate x = x1 for the
root, i.e.
x1 x 0
f (x 0 )
f (x 0 )
In general x n 1 x n
f (x n )
f (x n )
, see Figure 3
y = f (x)
x1 x3 x4
x
O x2 x0
f () f (x 0 h) f (x 0 ) h f (x 0 ) f (x 0 ) . . . 0
h2
2
x1 x 0 h x 0
f (x 0 )
f (x 0 )
xn 1 xn n 0, 1, 2, . . .
f (x n )
f (x n )
,
It is same as derived above geometrically. It may be stated that the root of convergence of N-R
method is faster as compared to other methods. Further, comparing the N-R method with
method of successive substitution, it can be seen as iterative scheme for
xx
f (x)
f (x)
(x) x
f (x)
f (x)
where
Example
Write N-R iterative scheme to find inverse of an integer number N. Hence, find inverse of 17
correct upto 4 places of decimal starting with 0.05.
Solution
Let inverse of N be x, so that we the equation to solve as,
x N 1 or x 1 N 0
f (x) x 1 N ; f (x)
1
x2
N-R scheme is
1
xn 1 xn x n x n2 N
f (x n )
f (x n ) xn
x n (2 N x n ) x n (2 17x n ) N 17.
We take x0 = 0.05.
Substituting in the formula, we get
x1 = 0.0575 ; x2 = 0.0588 ; x3 = 0.0588
0.0588 .
1
Hence,
17
Example
Write down N-R iterative scheme for finding qth root of a positive number N. Hence, find
cuberoot of 10 correct upto 3 places of decimal taking initial estimate as 2.0.
Solution
We have to solve x N q or x q N 0
1
f (x) x q N ; f (x) q x q 1
Example
Using N-R method find the root of the equation x – cos x = 0 correct upto two places of decimal
only. Take the starting value as ( = 3.1416, radian = 180o).
4
Solution
f (x) x cos x ; f (x) 1 sin x
Taking x 0
4
1 1
sin cos
x1 4 4 4
4 2 2
1 sin 1
1
4 2
1
4 0.7395
1.7854
2 1 2.4142
y= x
y = cos x
/2
x
O
Solution
Let � � = 3� − �� − 1
� ′ � = 3 + sin �
�(� )
� =� −
+1
� ′ (� )
� 0 = −2, � 1 = 2.540
�2 = 0.6071
�3 = 0.6071
Forward differences: The forward differences are defined and denoted by ∆f(x)=f(x+h)-f(x),
∆y0 = y1 – y0
∆y1 = y2 – y1
∆y2 = y3 – y2
…………….
∆yr = yr+1 – yr
…………….
∆yn-1 = yn – yn-1
These are called the first forward differences and ∆ is the forward difference operator.
Similarly the second forward differences are defined by
∆2 yr = ∆ yr+1 – ∆yr.
In general
∆p yr = ∆p-1 yr+1 – ∆p-1yr ,
pth forward differences.
The forward differences systematically set out in a table called forward difference table.
Value of Value of 1st diff. 2nd diff. 3rd diff. 4th diff. 5thdiff.
x y ∆ ∆2 ∆3 ∆4 ∆5
x0 y0
∆y0
x1 y1 ∆2y0
∆y1 ∆3y0
x2 y2 ∆2y1 ∆4y0
∆y2 ∆3y1 ∆5y0
x3 y3 ∆2y2 ∆4y1
∆y3 ∆3y2
x4 y4 ∆2y3
∆y4
x5 y5
Backward Differences: The backward differences are defined and denoted by f(x)= f(x)-f(x-h),
y1 = y1 – y0
y2 = y2 – y1
y3 = y3 – y2
…………….
yr = yr – yr-1
…………….
yn = yn – yn-1.
These are called the first backward differences and ∇ is the backward difference operator.
Similarly the second backward differences are defined by
2
yr = yr – yr-1.
In general
p
yr= p-1yr – p-1
yr-1 ,
th
p backward differences. The backward differences systematically set out in a table called backward
difference table.
Value of Value of 1st diff. 2nd diff. 3rd diff. 4th diff. 5thdiff.
x y ∇ 2 3 4 5
x0 y0
y1
2
x1 y1 y2
3
y2 y3
2 4
x2 y2 y3 y4
3 5
y3 y4 y5
2 4
x3 y3 y4 y5
3
y4 y5
2
x4 y4 y5
y5
x5 y5
Example#1. Evaluate
(i) ∆ tan-1x
(ii) ∆ (ex log 2x)
(iii) ∆2 cos 2x
Sol. From the definition of forward differences ∆f(x) = f(x+h) – f(x).
(i) Let f(x) = tan-1x, then
∆ tan-1x = tan-1(x+h) - tan-1x
xhx
= tan 1 tan 1 2
h
1 ( x h) x 1 hx x
.
x
x
h
e x e h log(1 ) (e h 1) log 2 x .
x
(iii) ∆2 cos 2x = ∆ [∆ cos 2x]
= ∆ [ cos 2(x+h) – cos 2x]
= ∆ cos 2(x+h) – ∆ cos 2x
= cos 2(x+2h) – cos 2(x+h) – [cos 2(x+h) ) – cos 2x]
= – 2 cos (2x+3h) sin h + 2 sin(2x+h) sin h
= – 2 sin h [sin(2x+3h) – sin(2x+h) ]
= – 2 sin h [2 cos(2x+2h)sin h]
= – 2 sin2 h cos 2(x+h).
Example#2. Evaluate the following, with interval of difference being unity
(i) ∆2 (abx) (ii) ∆n ex
Sol. From the definition of forward differences ∆f(x) = f(x+h) – f(x).
(i) ∆(abx) = a ∆bx = a(bx+1 – bx) = abx(b – 1)
∆2 (abx) = ∆ [∆ (abx)]
= ∆ abx(b – 1) = a(b – 1) ∆(bx)
= a(b – 1) (bx+1 – bx)
= a(b – 1)2 bx.
(ii) ∆e = ex+1 – ex = ex(e – 1)
x
Factorial Notation: A product of the form x(x – 1) (x – 2) …(x – r +1) is denoted by [x]r and is called
a factorial. In particular,
[x] = x, [x]2 = x(x – 1) , [x]3 = x(x – 1) (x – 2), …[x]n = x(x – 1) (x – 2) …(x – n +1).
If the interval of difference is h, then
[x]n = x(x – h) (x – 2h) …(x – (n – 1)h).
The factorial notation is of special utility in the theory of finite differences. It helps in finding the
successive differences of a polynomial directly by simple rule of differentiation ([x]r as xr).
To express a polynomial of nth degree in the factorial notation, we use the following two steps
1. Arrange the coefficients of the powers of x in descending order, replacing missing powers by
zeros.
2. Using detached coefficients divide by x, x – 1, x – 2, … x – (n – 1) successively.
Example#4. Express f(x) = 2x3 – 3x2 + 3x – 10 in a factorial notation and hence find all differences.
Sol. Let f(x) = A[x]3 + B[x]2 + C[x] + D. Then
x3 x2 x
1 2 -3 3 -10 = D
_ 2 -1
2 2 -1 2=C
_ 4
3 2 3=B
_
2=A
Ep f(x) = f(x0+ph)
yp = f(x0+ph) = Epf(x0)= (1+∆)py0
= [1+p∆+p(p-1)/2! ∆2 + p(p-1)(p-2)/3! ∆3 +…] y0
= y0 + p ∆y0 + p(p-1)/2! ∆2 y0+ p(p-1)(p-2)/3! ∆3 y0+…
It is called Newton’s forward interpolation formulae.
Example#1. The table gives the distances in nautical miles of the visible horizon for the given heights in
feet above the earth’s surface :
x y ∆ ∆2 ∆3 ∆4
100 10.63
2.4
150 13.03 -0.39
2.01 0.15
x0=200 15.04 -0.24 -0.07
1.77 0.08
250 16.81 -0.16 -0.05
1.61 0.03
+ 0.36(0.36-1)(0.36-2)(0.36-3)/24 (-0.01)
+ 0.2(0.2+1)(0.2+2)(0.2+3)/24 (-0.01)
Lagrange’s interpolation formula: If y = f(x) takes the values y0, y1, y2, …, yn corresponding to x0, x1,
x2, …, xn, then
(x x 1 )(x x 2 ) (x x n ) (x x 0 )(x x 2 ) (x x n )
f(x) y0 y1
(x 0 x 1 )(x 0 x 2 ) (x 0 x n ) (x 1 x 0 )(x 1 x 2 ) (x 1 x n )
(x x 0 )(x x 1 ) (x x n 1 )
(x n x 0 )(x n x 1 ) (x n x n 1 )
yn ,
Divided Differences: If (x0, y0), (x1, y1), …, (xn, yn) are given points, then the first divided differences
y y0
for the argument x0, x1 is defined by
[x 0 , x 1 ] 1
x1 x 0
.
y y1 y y2 y y n 1
Similarly
[x 1 , x 2 ] 2 , [x 2 , x 3 ] 3 ,, [x n 1 , x n ] n
x 2 x1 x3 x2 x n x n 1
.
[x , x ] [x 0 , x 1 ]
The second divided differences for x0, x1, x2 is
[x 0 , x 1 , x 2 ] 1 2
x2 x0
.
[x , x , x ] [x 0 , x 1 , x 2 ]
The third divided differences for x0, x1, x2 , x3 is
[x 0 , x 1 , x 2 , x 3 ] 1 2 3
x3 x0
.
And so on, the nth divided differences for x0, x1, x2, …, xn is
[x , x ,, x n ] [x 0 , x 1 ,, x n -1 ]
[x 0 , x 1 , x 2 ,, x n ] 1 2
xn x0
.
All the divided differences systematically set out in a table called divided difference table.
Value Value 1st 2nd 3rd divided 4th divided 5th divided
of x of y divided divided difference difference difference
difference difference
x0 y0
[x0,x1]
x1 y1 [x0,x1,x2]
[x1,x2] [x0,x1,x2,x3]
x2 y2 [x1,x2,x3] [x0,x1,x2,x3,x4]
[x2,x3] [x1,x2,x3,x4] [x0,x1,x2,x3,x4,x5]
x3 y3 [x2,x3,x4] [x1,x2,x3,x4,x5]
[x3,x4] [x2,x3,x4,x5]
x4 y4 [x3,x4,x5]
[x4,x5]
x5 y5
Newton’s divided difference formula: If y = f(x) takes the values y0, y1, y2, …, yn corresponding to x0,
x1, x2, …, xn, then
f(x) = y0+(x-x0)[x0, x1] + (x-x0)(x-x1)[x0, x1, x2] + …+ (x-x0)(x-x1)…(x-xn-1)[x0, x1, x2, …, xn],
which is known as Newton’s general interpolation formula with divided differences.
(x x 0 )(x x 1 )( x x 2 )(x x 3 )
(x 4 x 0 )(x 4 x 1 )( x 4 x 2 )(x 4 x 3 )
y4.
5 150
121
7 392 24
265 1
11 1452 32 0
457 1
13 2366 42
709
17 5202
By Newton divided difference formula
f(x) = y0+(x-x0)[x0, x1] + (x-x0)(x-x1)[x0, x1, x2] +(x-x0)(x-x1)(x-x2)[x0, x1, x2,x3]
+ (x-x0)(x-x1)(x-x2)(x-x3)[x0, x1, x2,x3,x4].
f(9) = 150 + (9 – 5)×121 + (9 – 5) (9 – 7)×24 + (9 – 5)(9 – 7)(9 – 11)×1
+ (9 – 5)(9 – 7)(9 – 11)(9 – 13)×0
= 150 + 484 + 192 – 16 + 0
= 810.
*************************************************************************