Module 5 Advanced Calculus & Numerical Methods
Module 5 Advanced Calculus & Numerical Methods
Course Material
MODULE V
1
DAYANANDA SAGAR COLLEGE OF ENGINEERING
(An Autonomous Institute Affiliated to VTU, Belagavi)
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078
DEPARTMENT OF MATHEMATICS
MODULE -5
Objectives:
Introduction
2
DAYANANDA SAGAR COLLEGE OF ENGINEERING
(An Autonomous Institute Affiliated to VTU, Belagavi)
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078
DEPARTMENT OF MATHEMATICS
2. Knowing the form of function which satisfies all the conditions/data on hand.
3. Obtaining the definite integral of the unknown function or the value of the definite integral
without the actual integration.
The numerical methods are highly useful when the analytical /theoretical approach to the
problems are either unavailable or highly difficult.
Finite differences:
Consider a function y=f(x). let x0, x1= x0+h, x2= x1+h , . . . . .,xn= xn-1+h be a set of points at a
common interval h . Let the corresponding values of y=f(x) be
y0=f(x0), y1=f(x1), y2=f(x2), . .. .. , yn=f(xn).
The value of the dependent variable x is called the argument and the corresponding functional
value is known as entry. We define forward and backward differences concerning these values.
Forward differences:
The first difference of f(x) is denoted by ∆f(x) and it is defined as follows
∆f(x)= f(x+h) - f(x), ∆ is called the forward differences
Thus for the values x0, x1, x2, . . . ,xn , forward difference is defined as
∆ f(x ) = f(x + h) or ∆ y = y − y
∆ f(x ) = f(x + h) − f (x ) or ∆y = y − y
∆ f(x ) = f(x + h) − f (x ) or ∆y = y − y
∆ f(x ) = f(x + h) − f (x ) or ∆y =y −y
The difference of the first forward differences is called second forward differences. They are as
follows.
∆ y = ∆y - ∆y ,
∆ y = ∆y - ∆y ,
∆ y = ∆y - ∆y , . . . ,∆ y = ∆y - ∆y
Similarly, the higher order differences namely the third, fourth, etc., are obtained and
tabulated.
Such a tabular arrangement is called forward difference table
3
DAYANANDA SAGAR COLLEGE OF ENGINEERING
(An Autonomous Institute Affiliated to VTU, Belagavi)
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078
DEPARTMENT OF MATHEMATICS
x y ∆y ∆ y ∆ y ... ∆ y
x0 y0
∆y
x1 y ∆ y
∆y ∆ y
x2 y2 ∆ y .
.
. . . . ∆ y
. .
. . . .
.
. . . ∆ y
xn-1 yn-1 ∆ y
∆y
xn yn
The first entries in the table namely ∆y , ∆ y , . . . , ∆ y are called the leading forward
differences.
Backward differences:
The backward difference of f(x) is defined as follows.
∇ f(x) = f(x) − f( x − h)
∇ is called the backward difference operator.
If x = xn : ∇ f(x ) = f(x ) − f(x − ℎ) or ∇ yn = y - y
If x = x :∇f(x )=f(x )-f(x - h ) or y = y − y . . . , etc
y = y − y ,∇y = y − y
The difference of the first backward differences is known as second backward differences. They
are as follows. ∆ y = ∇y ,∇ y = ∇y -- ∇y , . . . , ∇ y = ∇y -- ∇y
4
DAYANANDA SAGAR COLLEGE OF ENGINEERING
(An Autonomous Institute Affiliated to VTU, Belagavi)
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078
DEPARTMENT OF MATHEMATICS
Similarly the other higher order backward differences namely the third, fourth etc are formed
and tabulated. Such a tabular arrangement is called backward difference table
X y ∇𝑦 ∇ 𝑦 ∇ 𝑦 ... ∇ y
𝑥 𝑦
∇𝑦
𝑥 𝑦 ∇ 𝑦
∇𝑦 ∇ 𝑦
𝑥 𝑦 ∇ 𝑦
. .
. . ∇ 𝑦
. .
. .
. ∇ 𝑦
. .
∇ 𝑦
𝑥 𝑦
∇𝑦
𝑥 𝑦
1) Construct the difference table for the function f(x) = x3 + x +1 where x takes the values
0,1,2,3,4,5,6. Identify the leading forward and backward differences.
X 0 1 2 3 4 5 6
f (x ) 1 3 11 31 69 131 223
5
DAYANANDA SAGAR COLLEGE OF ENGINEERING
(An Autonomous Institute Affiliated to VTU, Belagavi)
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078
DEPARTMENT OF MATHEMATICS
Solution:
0 1
2
1 3 6
8 6
2 11 12 0
20 6
3 31 18 0
38 6
4 69 24 0
62 6
5 131 30
92
6 223
leading forward differences are 2 ,6 ,6, 0 and leading backward differences are 92, 30, 6 , 0.
x 0 10 20 30 40
f (x ) 1 1.5 2.2 3.1 4.6
Solution:
x y ∆𝑦 ∆ 𝑦 ∆ 𝑦 ∆ 𝑦
0 0.5
0.5
10 1.5 0.2
0.7 0
20 2.2 0.2 0.4
0.9 0.4
30 3.1 0.6
1.5
40 4.6
6
DAYANANDA SAGAR COLLEGE OF ENGINEERING
(An Autonomous Institute Affiliated to VTU, Belagavi)
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078
DEPARTMENT OF MATHEMATICS
INTERPOLATION
Introduction:
Interpolation the process of finding the most appropriate estimate for missing data. It is
the “ art of reading between the lines of a table “ . For making the most probable estimate it
requires the following assumptions.
i) The frequency distribution is normal and not marked by sudden ups and downs.
ii) The changes in the series are uniform within a period.
Interpolation technique is used in various disciplines like economics, business, population
studies, price determination etc. It is also used to fill in the gaps in the stastical data for the
sake of continuity of information. For example, if we know the records for the past five years
expect the year which is not available due to unforeseen conditions the interpolation technique
helps to estimate the record for that yea too under the assumption that the changes in the
records over these five years have been uniform.
It also possible that we may require information for future in which case the process of
estimating the most appropriate value is known as extrapolation
We discuss interpolation formulae for equal intervals based on forward and backward
differences.
These formulae are established by approximating the unknown function to a polynomial in x
whose values coincide with the value of f ( x ) at the specified points of x : x 0 , x1 , x2 , . . . , xn .
7
DAYANANDA SAGAR COLLEGE OF ENGINEERING
(An Autonomous Institute Affiliated to VTU, Belagavi)
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078
DEPARTMENT OF MATHEMATICS
( ) ( )( ) ( )( )…( )
y =y +r∆y + ∆ y + ∆ y +....+ ∆ y
! ! !
Where r is any real number
To estimate the value of y at a desired value of x near the beginning of the table (first half, x is
close to 𝑥 ) forward formula is appropriate.
Similarly To estimate the value of y at a desired value of x near the end of the table (second
half, x is close to 𝑥 ) backward formula is appropriate.
The polynomial y = f (x) satisfying the data can also be found from these formulae and it is
called an interpolating polynomial.
8
DAYANANDA SAGAR COLLEGE OF ENGINEERING
(An Autonomous Institute Affiliated to VTU, Belagavi)
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078
DEPARTMENT OF MATHEMATICS
Problem:
Solution:
x y ∆𝑦 ∆ 𝑦 ∆ 𝑦 ∆ 𝑦
1 10
16
2 26 16
32 6
3 58 22 0
54 6
4 112 28
82
5 194
( ) ( )( )
y =y +r∆y + ∆ y + ∆ y +....
! !
.
where r = = = 1.4
( . )( . ) ( . )( . )( . )
y(1.4) = 10 + (0.4) 16 + (16) + +0
= 14.864
D 80 85 90 95 100
A 5026 5674 6362 7088 7854
9
DAYANANDA SAGAR COLLEGE OF ENGINEERING
(An Autonomous Institute Affiliated to VTU, Belagavi)
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078
DEPARTMENT OF MATHEMATICS
Solution:
x=D y=A ∇y ∇ y ∇ y ∇ y
80 5026
648
85 5674 40
688 -2
90 6362 38 4
726 2
95 7088 40
766
100 7854
( ) ( )( ) ( )( )…( )
y = y + r ∇y + ∇ y + ∇ y +....+ ∇ y
! ! !
Where r = = =1
( )( ) ( )( )( ) ( )( )( )( )
y (105) = 7854 + 1 (766) + (40) + (2) + (4)
= 8666
3) Find the interpolating polynomial f(x) satisfying f(0) = 0 , f(2) = 4 , f( 4) = 56 , f(6) = 204 ,
f(8) = 496 , f(10) = 980 and hence find f(3),f(5) and f(7).
Solution:
x y ∆𝑦 ∆ 𝑦 ∆ 𝑦 ∆ 𝑦
0 0
4
2 4 48
52 48
4 56 96 0
148 48
6 204 144 0
292 48
8 496 192
484
10 980
10
DAYANANDA SAGAR COLLEGE OF ENGINEERING
(An Autonomous Institute Affiliated to VTU, Belagavi)
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078
DEPARTMENT OF MATHEMATICS
( ) ( )( ) ( )( )…( )
y = y + r ∆y + ∆ y + ∆ y + . . . . + ∆ y
! ! !
r= = =
( )
y = f(x) = 0 + (4) + (48) + (48) + 0
y = f(x) =x3 -2x
f(3) = 21
f(5) = 115
f(7) = 329.
4) The population of a town is given by the table. Using newton’s forward and backward
interpolation formulae, calculate the increase in the population from the year 1955 to 1985.
1951 19.96
19.96
1961 39.65 -0.53
19.16 -0.23
1971 58.81 -0.76 -0.01
18.4 -0.24
1981 77.21 -1
17.4
1991 94.61
Case – (i) to find y(1955)
( ) ( )( ) ( )( )…( )
y =y +r∆y + ∆ y + ∆ y +....+ ∆ y
! ! !
r= = = 0.4
11
DAYANANDA SAGAR COLLEGE OF ENGINEERING
(An Autonomous Institute Affiliated to VTU, Belagavi)
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078
DEPARTMENT OF MATHEMATICS
( . )( . ) ( . )( )(( . )
y(1955) = 19.96 + (0.4) (19.96) + (-0.53) + (-0.23)
( . )( . )( . )( . )
+ (-0.01)
= 27.89
Case- (ii) to find y( 1985)
( ) ( )( ) ( )( )…( )
y = y + r ∇y + ∇ y + ∇ y +....+ ∇ y
! ! !
Where r = = = -0.6
y(1985) = 84.3
Thus the increase in the population from the year 1955 to 1985 is 84.3 – 27.89 = 56.41
thousands
5) From the following table find the number of students who have obtained (a) less than 45
marks (b) between 40 and 45 marks.
Marks 30-40 40-50 50-60 60-70 70-80
No. of 31 42 51 35 31
students
Solution:
We shall reconstitute the given table with table with f(x) reprenting the number of students less
than x marks. That is
Less than 40 marks =31 students Less than 50 marks = 73 students
Less than 60 marks = 124 students Less than 70 marks = 159 students
Less than 80 marks = 190 students
x y ∆𝑦 ∆ 𝑦 ∆ 𝑦 ∆ 𝑦
40 31
42
50 73 9
51 -25
60 124 -16 37
35 12
70 159 -4
31
80 190
12
DAYANANDA SAGAR COLLEGE OF ENGINEERING
(An Autonomous Institute Affiliated to VTU, Belagavi)
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078
DEPARTMENT OF MATHEMATICS
( ) ( )( ) ( )( )…( )
y =y +r∆y + ∆ y + ∆ y +....+ ∆ y
! ! !
𝐱 𝐱𝟎 𝟒𝟓 𝟒𝟎
r= = = 0.5
𝐡 𝟏𝟎
( . )( . ) ( . )( . )( . ) ( . )( . )( . )( . )
y(45) = 31 + (0.5) 42 + (9) + (-25) + (37)
f(45) = 47.86 ≈ 48
b) To find number of students scoring marks between 40 and 45
By data, f(45) – f(40) = 48 – 31 = 17 .
𝑥 f(𝑥 )
f(𝑥 , 𝑥 )
𝑥 f(𝑥 ) f(𝑥 , 𝑥 , 𝑥 )
f(𝑥 , 𝑥 )
𝑥 f(𝑥 ) f(𝑥 , 𝑥 , 𝑥 )
f(𝑥 , 𝑥 )
. . .
. f(𝑥 , 𝑥 , … , 𝑥 )
. . .
𝑥 f(𝑥 )
f(𝑥 ,𝑥 )
𝑥 f(𝑥 ) f(𝑥 ,𝑥 ,𝑥 )
f(𝑥 ,𝑥 )
𝑥 f(𝑥 )
13
DAYANANDA SAGAR COLLEGE OF ENGINEERING
(An Autonomous Institute Affiliated to VTU, Belagavi)
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078
DEPARTMENT OF MATHEMATICS
( , ) ( , ) ( , ) ( , )
x ,x ,x ) = , f (x ,x ,x ) = , etc . ,
( , ) ( , )
f(x ,x ,x ) =
Similarly, the other higher order divided differences are defined. The tabular arrangement of
these values is called the divided difference table and is as follows.
If f(x0), f(x1),f(x2), . . . , f(xn) be the set of values of an unknown function f(x) corresponding to
the values of x : x0 , x1 , x2 , . . . , xn and so on at unequal intervals, then
y= f(x ) + ( x – x0)f(x , x ) + (x – x0 )(x – x1) f(x , x , x ) + (x-x0) (x-x1)…(x-xn-1)f(x , x , … , x )
Problems
1. Using Newton’s divided difference formula find f(8),f(15) from the following table
x 4 5 7 10 11 13
f(x) 48 100 294 900 1210 2028
Solution:
The divided difference table is as follows
x f(x) 1stD.D 2nd D.D 3rd D.D 4th D.D
4 48
52
5 100 15
97 1
7 294 21 0
202 1
10 900 27 0
310 1
11 1210 33
409
13 2028
We have Newton’s divided difference formula
Y=f(x)= f(x ) + ( x – x0)f(x , x ) + (x – x0 )(x – x1) f(x , x , x ) + (x-x0) (x-x1) . .
(x-xn-1)f(x , x , … , x )
14
DAYANANDA SAGAR COLLEGE OF ENGINEERING
(An Autonomous Institute Affiliated to VTU, Belagavi)
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078
DEPARTMENT OF MATHEMATICS
f(x) = 48 + ( x – 4 ) 52 + (x – 4 ) ( x – 5 ) 15 + (x -4) (x – 5 ) (x – 7 ) 1
f(x) = x3 – x2 ,
hence f(8) = 448 ;
f(15) = 3150.
2. Determine f(x) as a polynomial in x for the following data using Newton’s divided difference
formula
X -4 -1 0 2 5
y 1245 33 5 9 1335
Solution.
x y 1stD.D 2nd D.D 3rd D.D 4th D.D
-4 1245
-404
-1 33 94
-28 -14
0 5 10 3
2 13
2 9 88
442
5 1335
We studied the Lagrange interpolation problem in several variables from the viewpoint of
arranging the interpolation points in blocks, where the size of a block is the same as the
dimension of a corresponding polynomial subspace.
15
DAYANANDA SAGAR COLLEGE OF ENGINEERING
(An Autonomous Institute Affiliated to VTU, Belagavi)
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078
DEPARTMENT OF MATHEMATICS
For univariate Lagrange interpolation, one needs to increase the degree of polynomial by one
for each interpolation point added, which is the essence of the Newton formula. The blockwise
interpolation defined is in the same spirit: for each block of points added, we increase the
polynomial degree by one. From this viewpoint, it is only natural that we established an
interpolation formula analogous to that of Newton. The starting point for such a formula is a
finite difference applied to a function ‘f’, which is defined recursively and involves certain
fundamental polynomials of interpolation. That this difference is meaningful is justified not only
by the Newton formula it helps to establish, but also by the fact that it admits a representation
which is a sum of integrals of certain directional derivatives of ‘f’ multiplied by simplex spline
functions. This representation is analogous to the B-spline representation of the univariate
divided difference; furthermore, it leads to a remainder formula for Lagrange interpolation.
(x − x )(x − x ) … … (x − x ) (x − x )(x − x ) … … (x − x )
y = f(x) = y + y
(x − x )(x − x ) … … (x − x ) (x − x )(x − x ) … … (x − x )
(x − x )(x − x ) … … (x − x ) (x − x )(x − x ) … … (x − x )
+ y + …… + y
(x − x )(x − x ) … … (x − x ) (x − x )(x − x ) … … (x − x )
Note:
1. The special features of this formula is that the terms of the formula involve only the values in
the variables x and y.
2. The values of x also need not be equally spaced, nor need they be in any order.
3. We can interchange the role of x and y in the formula and the same is called Lagrange’s
inverse interpolation formula which helps to find x for a given y. The formula is as follows
(y − y )(y − y ) … … (y − y ) (y − y )(y − y ) … … (y − y )
x= x + x
(y − y )(y − y ) … … (y − y ) (y − y )(y − y ) … … (y − y )
(y − y )(y − y ) … … (y − y ) (y − y )(y − y ) … … (y − y )
+ x + …+ x
(y − y )(y − y ) … … (y − y ) (y − y )(y − y ) … … (y − y )
16
DAYANANDA SAGAR COLLEGE OF ENGINEERING
(An Autonomous Institute Affiliated to VTU, Belagavi)
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078
DEPARTMENT OF MATHEMATICS
Problems:
x 5 7 11 13 17
y 150 392 1452 2366 5202
Solution:
( 9 − 7 )( 9 − 11 )( 9 − 13 )( 9 − 17 )
y = f(x) = ( 150 )
( 5 − 7 )( 5 − 11 )( 5 − 13 )( 5 − 17 )
( 9 − 5 )( 9 − 11 )( 9 − 13 )( 9 − 17 )
+ ( 392 )
( 7 − 5 )( 7 − 11 )( 7 − 13 )( 7 − 17 )
( 9 − 5 )( 9 − 7 )( 9 − 13 )( 9 − 17 )
+ ( 1452 )
( 11 − 5 )( 11 − 7 )( 11 − 13 )( 11 − 17 )
( 9 − 5 )( 9 − 7 )( 9 − 11 )( 9 − 17 )
+ ( 2366 )
( 11 − 5 )( 13 − 7 )( 13 − 11 )( 13 − 17 )
17
DAYANANDA SAGAR COLLEGE OF ENGINEERING
(An Autonomous Institute Affiliated to VTU, Belagavi)
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078
DEPARTMENT OF MATHEMATICS
( 9 − 5)( 9 − 7 )( 9 − 11 )( 9 − 13 )
+ ( 5202 )
( 17 − 5 )( 17 − 7 )( 17 − 11 )( 17 − 13 )
= 810
( x − 1 )( x − 2 )( x − 5 ) ( x − 0 )( x − 2 )( x − 5 )
= (2)+ (3)
( 0 − 1 )(0 − 2 )( 0 − 5 ) ( 1 − 0 )( 1 − 2 )( 1 − 5 )
( x − 0 )( x − 1 )( x − 5 ) ( x − 0 )( x − 1 )( x − 2 )
+ ( 12 ) + ( 147 )
( 2 − 0 )( 2 − 1 )( 2 − 5 ) ( 5 − 0 )( 5 − 1 )( 5 − 2 )
1 3
y = f(x) = − ( x − 8x + 17x − 10 ) + (x − 7x + 10x)
5 4
49
−2 ( x − 6x + 5x ) + (x − 3x + 2x)
20
1
= ( 20x + 20x − 20x + 40 )
20
y = f(x) = x + x − x + 2
18
DAYANANDA SAGAR COLLEGE OF ENGINEERING
(An Autonomous Institute Affiliated to VTU, Belagavi)
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078
DEPARTMENT OF MATHEMATICS
To find f ( 3 ) put x = 3
y = f( 3 ) = 3 + 3 − 3 + 2 = 35
3. Using Lagrange’s formula find the interpolating polynomial and find ‘ x ‘ when y = 4 from the
data given below
X 2 10 17 37
Y 0 2 3 5
Solution:
We use Lagrange’s inverse interpolation formula which helps to find x for a given y. The
formula is as follows
( y − 2 )( y − 3 )( y − 5 ) ( y − 0 )( y − 3 )( y − 5 )
= (2)+ ( 10 )
( 0 − 2 )(0 − 3 )( 0 − 3 ) ( 2 − 0 )( 2 − 3 )( 2 − 5 )
( y − 0 )( y − 2 )( y − 5 ) ( y − 0 )( y − 2 )( y − 3 )
+ ( 17 ) + ( 37 )
( 3 − 0 )( 3 − 2 )( 3 − 5 ) ( 5 − 0 )( 5 − 2 )( 5 − 3 )
1 5
x = f(y) = − ( y − 10y + 31y − 30 ) + ( y − 8y + 15y )
15 3
17 37
− (y − 7y + 10y) + (y − 5y + 6y)
6 30
19
DAYANANDA SAGAR COLLEGE OF ENGINEERING
(An Autonomous Institute Affiliated to VTU, Belagavi)
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078
DEPARTMENT OF MATHEMATICS
1
= (0y + 30y + 60y + 60)
30
x = f(y) = y + 2y + 2
x = f(y) = 4 + 2(4) + 2 = 26
Equation involving non algebraic quantities like e , log x, sin x, tan x etc are called as
Trancendental equations.
Eg. x e -2=0,xlog x-12 = 0, tan x = 2x
Numerical methods of finding approximate roots of the given equation are a repetitive type of
process known as iteration process. In each step the results of the previous step is used and the
process is carried out till we get the result to the desired accuracy. The value obtained in the
succeeding step is always better than the value of the proceeding step. All the numerical
methods are only approximate techniques for the solution of any problem and computers play
a great role in various numerical methods for obtaining the result to the highest degree of
accuracy.
20
DAYANANDA SAGAR COLLEGE OF ENGINEERING
(An Autonomous Institute Affiliated to VTU, Belagavi)
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078
DEPARTMENT OF MATHEMATICS
Since the graph of y =f(x) crosses the x –axis between these two points, a root must lies in
between these points.
Now, the equation of the chord joining the two points [a, f(a)] and [b, f(b)] is
( ) ( ) ( )
= ------------------------ (1)
The method consists in replacing the part of the curve between the points [a, f(a)] and [b, f(b)]
by means of the chord joining these points, and taking the point of intersection of the chord
with the x- axis as an approximation to the root.
The point of intersection in the present case is given by putting y= 0 in (1).
Thus, we obtain
( ) ( ) ( )
=
i.e., (x − a)[f(a) − f(b)] = −(b − a)f(a)
NOTE:
If a, b is close enough we can obtain the approximate root to the desired accuracy
quickly. The problems are worked out by finding a and b difference of 0.1 to determine the
iterative process quickly.
21
DAYANANDA SAGAR COLLEGE OF ENGINEERING
(An Autonomous Institute Affiliated to VTU, Belagavi)
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078
DEPARTMENT OF MATHEMATICS
PROBLEMS:
1) Using Regula falsi method, compute the real root of the equation 𝐱 𝟑 − 𝟒𝐱 − 𝟗 = 𝟎
f(0) = -9
f(1) = -12
f(2) = -9< 0
f(3) = 6> 0
It may be observed that the value of f(x) at x=3being 6 is nearer to zero compared to
f(2) = -9 and we expect the root in the neighborhood of 3 .We shall have interval (a,b) for
appling the method such that b-a is small enough.
( . )( . ) ( . )( . )
∴ x = = 2.7062
. .
22
DAYANANDA SAGAR COLLEGE OF ENGINEERING
(An Autonomous Institute Affiliated to VTU, Belagavi)
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078
DEPARTMENT OF MATHEMATICS
( . )( . ) ( . )( . )
∴ x = = 2.7785
. .
( . )( . ) ( . )( . )
∴ x = = 2.7660
. .
( . )( . ) ( . )( . )
∴ x = = 2.7566~2.757
. .
Hence the required approximation root correct to three decimal place is 2.757
2) Determine the root of x𝐞𝐱 -2 = 0 by the method of false position, carry out four iteration.
23
DAYANANDA SAGAR COLLEGE OF ENGINEERING
(An Autonomous Institute Affiliated to VTU, Belagavi)
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078
DEPARTMENT OF MATHEMATICS
It may be observed that the value of f(x) at x=1being 0.718 is nearer to zero compared to
f(0) = -2 and we expect the root in the neighborhood of 1 .We shall have interval (a,b) for
appling the method such that b-a is small enough.
( . )( . ) ( . )( . )
∴ x = = 0.851
. .
( . )( . ) ( . )( . )
∴ x = = 0.85256
. .
24
DAYANANDA SAGAR COLLEGE OF ENGINEERING
(An Autonomous Institute Affiliated to VTU, Belagavi)
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078
DEPARTMENT OF MATHEMATICS
( ) ( )
3rd approximation x = ( ) ( )
( . )( . ) ( . )( . )
∴ x = = 0.8526
. .
( . )( . ) ( . )( . )
∴ x = = 0.8526
. .
Hence the required approximation root correct to three decimal place is 0.8526
3) Using Regula falsi method, find the root of the equation x𝐞𝐱 = 𝐜𝐨𝐬 𝐱 that lies between o.4
&0.6, carry out four iterations.
f(0.6) = 0.2679> 0
( . )( . ) ( . )( . )
∴ x = = 0.5095
. .
25
DAYANANDA SAGAR COLLEGE OF ENGINEERING
(An Autonomous Institute Affiliated to VTU, Belagavi)
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078
DEPARTMENT OF MATHEMATICS
( . )( . ) ( . )( . )
∴ x = = 0.4441
. .
( . )( . ) ( . )( . )
∴ x = = 0.4640
. .
( . )( . ) ( . )( . )
∴ x = = 0.4751
. .
Hence the required approximation root correct to three decimal place is 0.475
26
DAYANANDA SAGAR COLLEGE OF ENGINEERING
(An Autonomous Institute Affiliated to VTU, Belagavi)
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078
DEPARTMENT OF MATHEMATICS
4) Find a real root of the equation x𝐥𝐨𝐠 𝟏𝟎 𝐱 = 𝟏. 𝟐 by Regula falsi method correct to four
decimal places & carry out three iterations.
( ) ( )
𝟏𝐬𝐭 Approximation x = ( ) ( )
( . )( . ) . ( . )
∴ x = = 2.7404
. .
II iteration : f(x1) = f(2.7404) = -0.00021< 0
∴ the root lies in (2.704,2.8)
Now a = 2.7404 f(a) = -0.00021
b = 2.8 f(b) = 0.052
( ) ( )
2nd approximation x = ( ) ( )
( . )( . ) ( . )( . )
∴ x = = 2.7406
. .
27
DAYANANDA SAGAR COLLEGE OF ENGINEERING
(An Autonomous Institute Affiliated to VTU, Belagavi)
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078
DEPARTMENT OF MATHEMATICS
( ) ( )
3rd approximation x = ( ) ( )
( . )( . ) ( . )( . )
∴ x = = 2.740646
. .
Thus the required approximate root correct to four decimal places is 2.7406
5) Use the method of false position, to find the fourth root of 32 correct to three decimal
places.
( ) ( )
2nd approximation x = ( ) ( )
( . )( . ) ( . )( . )
∴ x = = 2.3780~2.378
. .
III iteration : f(x2) = (2.378) = -0.02228 < 0
∴ the root lies in (2.378,2.4)
28
DAYANANDA SAGAR COLLEGE OF ENGINEERING
(An Autonomous Institute Affiliated to VTU, Belagavi)
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078
DEPARTMENT OF MATHEMATICS
( ) ( )
3rd approximation x = ( ) ( )
( . )( . ) ( . )( . )
∴ x = = 2.37840~2.378
. .
Hence the required approximation root correct to three decimal place is 2.378
29
DAYANANDA SAGAR COLLEGE OF ENGINEERING
(An Autonomous Institute Affiliated to VTU, Belagavi)
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078
DEPARTMENT OF MATHEMATICS
Problems:
1) Use Newton Raphon,s method to find a real root of the equation 𝐱 𝟒 -x-10=0
2) Using Newton Raphon method, find the root that lies near x = 3.8 of the equation
𝟐𝐱 − 𝐥𝐨𝐠 𝟏𝟎 𝐱 – 7 = 0
I iteration:
( ) ( . )
X1 = x0 - )
= 3.8 -
‘( ‘( . )
.
X1 = 3.8 - = 3.7893
.
30
DAYANANDA SAGAR COLLEGE OF ENGINEERING
(An Autonomous Institute Affiliated to VTU, Belagavi)
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078
DEPARTMENT OF MATHEMATICS
II iteration:
( ) ( . )
X2 = x1- = 3.7893 - )
‘( ) ‘( .
X2 = 3.789278 ~ 3.7893
3) Find the real root of the equation 3x = 𝐜𝐨𝐬 𝐱 + 1 correct to four decimal places using
Newton’s method
I iteration:
( ) ( . )
X1 = x0 - )
= 4.5-
‘( ‘( . )
31
DAYANANDA SAGAR COLLEGE OF ENGINEERING
(An Autonomous Institute Affiliated to VTU, Belagavi)
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078
DEPARTMENT OF MATHEMATICS
[ ( . ) . ]
X1 = 4.5 – = 4.4936
( . )
II iteration:
( ) ( . )
X2 = x1- = 4.4936 - )
‘( ) ‘( .
[ ( . ) . ]
X2 = 4.4936 – = 4.4934
( . )
III iteration:
( ) ( . )
X3 = x2- = 4.4934 - )
‘( ) ‘( .
[ ( . ) . ]
X2 = 4.4934 – = 4.4934
( . )
Thus the required root is 4.4934
5) Using Newton Raphon method to derive an iteration formula to find √𝐍 and hence
𝐟𝐢𝐧𝐝 √𝟐𝟖
Soln.: Let x = √N
X2 = N
or X2 – N = 0
taking f(x) = x2 – N
We have f’(x) = 2x
Then Newton’s iterative formula gives
( )
x = xn -
‘( )
( )
x xn - =
) )
I.e. x N
x + x ---------------------- (1)
This is the required iteration formula for finding √N
To find √28 taking N = 28, the above formula (1), becomes x x + 28
x
Since an approximate value of √28 = 5, we take x0 = 5
Then x x + 28 x = 5 + 28 5 = 5.3
x x + 28 x = 5.3 + 28 5.3 = 5.29151
28 = 28
x x + x 5.28151 + 5.29151 = 5.29150
∴ √28 = 5.2915.
32
DAYANANDA SAGAR COLLEGE OF ENGINEERING
(An Autonomous Institute Affiliated to VTU, Belagavi)
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078
DEPARTMENT OF MATHEMATICS
6) Find the smallest and largest of 𝐞𝐱 − 𝟒𝐱 = 𝟎 , correct four decimal places by Newton
Raphson method
Soln: For finding Smallest root
f(x) = e − 4x =>f’(x) =e − 4
f (0) =1>0
f (1) =e − 4 = −1.2817 < 0
x=0.3 f(0.3)=0.1499>0
x=0.4 f(0.4)= -0.1082<0
∴ Roots lies between (0.3, 0.4)
x = 0.3
I-iteration:
( ) .
x =x − = 0.3 + = 0.3565
( ) .
II-iteration:
( ) .
x =x − = 0.3566 + = 0.3574
( ) .
III-iteration:
( ) .
x =x − = 0.357 + = 0.3574
( ) .
For finding Largest roots: f (2) =e − 4 = −0.6109 > 0
f (3) =e − 12 = 8.0855 < 0
x =3
I-iteration:
( ) ( )
x =x − =3+ = 2.4973
( ) ( )
II-iteration:
( ) ( . )
x =x − = 2.4973 + = 2.2322
( ) ( . )
III-iteration:
( )
x =x − = 2.1586
( )
IV-iteration:
x = 2.1533
V-iteration:
( ) .
x =x − = 2.1533 − = 2.1533
( ) .
33
DAYANANDA SAGAR COLLEGE OF ENGINEERING
(An Autonomous Institute Affiliated to VTU, Belagavi)
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078
DEPARTMENT OF MATHEMATICS
NUMERICAL INTEGRATION
to a given degree of accuracy. If f(x) is a smooth function integrated over a small number of
dimensions, and the domain of integration is bounded, there are many methods for
approximating the integral to the desired precison.
There are several reasons for carrying out numerical integration. The integrand f(x) may be
known only at certain points, such as obtained by sampling. Some embedded systems and
other computer applications may need numerical integration for this reason.
A formula for the integrand may be known, but it may be difficult or impossible to find an anti-
derivative which is an elementary function. An example of such an integrand is f(x) = exp(−x2),
34
DAYANANDA SAGAR COLLEGE OF ENGINEERING
(An Autonomous Institute Affiliated to VTU, Belagavi)
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078
DEPARTMENT OF MATHEMATICS
the anti-derivative of which (the error function, times a constant) cannot be written in
elementary form.
It may be possible to find an anti-derivative symbolically, but it may be easier to compute a
numerical approximation than to compute the anti-derivative. That may be the case if the anti-
derivative is given as an infinite series or product, or if its evaluation requires a special function
which is not available.
This is the process of obtaining approximately the value of the definite integral I = ∫ y dx
without actually integrating the function but only using the values of y at some points of x
equally spaced over [ a , b ]. We need techniques to accomplish this because, not all functions
can be integrated by the various standard methods of integration. Further there are many
situations where we have only some values of y corresponding to equidistant values of x.
The interval [ a , b ] is divided into n equal parts of width h where h=( b – a )/n.
Now we have a set of values of y = f(x) at equidistant points of x and the values ( x, y ) are
tabulated.
x a=x x x ------ x =b
y y y y ------ y
𝒉
I= [ (𝐲𝟎 + 𝐲𝐧 ) + 𝟐(𝐲𝟏 + 𝐲𝟐 + … … … + 𝐲𝐧 𝟏 )]
𝟐
𝒉
I= [ (𝐲𝟎 + 𝐲𝐧 ) + 𝟒(𝐲𝟏 + 𝐲𝟑 + … … … + 𝐲𝐧 𝟏 ) + 𝟐(𝐲𝟐 + 𝐲𝟒 + … … … + 𝐲𝐧 𝟐 )]
𝟑
35
DAYANANDA SAGAR COLLEGE OF ENGINEERING
(An Autonomous Institute Affiliated to VTU, Belagavi)
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078
DEPARTMENT OF MATHEMATICS
𝟑𝒉
I= [ (𝐲𝟎 + 𝐲𝐧 ) + 𝟑(𝐲𝟏 + 𝐲𝟐 + 𝐲𝟒 + 𝐲𝟓 + … … … + 𝐲𝐧 𝟏 ) + 𝟐(𝐲𝟑 + 𝐲𝟔 + … … … + 𝐲𝐧 𝟑 )]
𝟖
Weddle’s rule:
𝟑𝐡
I= ∑𝐧𝐢 𝟎 𝐤 𝐲𝐢 , where k = 1 , 5 , 1 , 6 , 1 , 5 , 2 , 5 , 1 , 6 , 1 , 5 , 2 , ………
𝟏𝟎
𝟑𝒉
I= [ (𝐲𝟎 + 𝐲𝟔 ) + 𝟓(𝐲𝟏 + 𝐲𝟓 ) + (𝐲𝟐 + 𝐲𝟒 ) + 𝟔𝐲𝟑 ]
𝟏𝟎
Notes:
1. When we divide the interval into n equal parts there will be (n+1) values of a = x , x = x +
h , x = x + 2h , … … … x = x + nh = b . the corresponding values of y, also ( n+1 ) in
number are referred to as the ~ ordinates’. So we can conclude that if there are ( n+1 )
ordinates there must be n equal divisions.
when n = 6 or multiple of 6 all the rules can be applied to find the approximate value of the
given definite integral.
36
DAYANANDA SAGAR COLLEGE OF ENGINEERING
(An Autonomous Institute Affiliated to VTU, Belagavi)
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078
DEPARTMENT OF MATHEMATICS
1. Given the definite integral I = ∫ y dx for evaluation, first divide the interval [ a , b ] into
appropriate number of equal parts (strips) so as to apply the desired rule. a = x , x = x +
h , x = x + 2h , … … … x = x + nh = b be the points of division inclusive of the ends.
2. Prepare a table consisting the values of x and the corresponding computed values of y denoted
respectively by y = f(x ), y = f(x ), y = f(x ), … … … … y = f(x )
3. Substitute values from this table into the appropriate rule to obtain the approximate value of
the given definite integral.
Note:
Sometimes it is possible to deduce the value of a certain quantity by equating the theoretical
value of the definite integral (when exists) with that of the numerical value obtained without
integration using the rule.
Problems:
Solution:
/
= 1+ +4 + +2 = 0.7854
37
DAYANANDA SAGAR COLLEGE OF ENGINEERING
(An Autonomous Institute Affiliated to VTU, Belagavi)
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078
DEPARTMENT OF MATHEMATICS
Solution:
𝟑/𝟔
I= [ (𝐲𝟎 + 𝐲𝟔 ) + 𝟑(𝐲𝟏 + 𝐲𝟐 + 𝐲𝟒 + 𝐲𝟓 ) + 𝟐(𝐲𝟑 )]
𝟖
= 1+ +3 + + + +2
= 0.6932
log 2 = 0.6932
38
DAYANANDA SAGAR COLLEGE OF ENGINEERING
(An Autonomous Institute Affiliated to VTU, Belagavi)
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078
DEPARTMENT OF MATHEMATICS
x 0 1 2 3 4 5 6
y=3x y =0 y =3 y = 12 y = 27 y = 48 y = 75 y = 108
𝒉
I= [ (𝐲𝟎 + 𝐲𝐧 ) + 𝟒(𝐲𝟏 + 𝐲𝟑 + … … … + 𝐲𝐧 𝟏 ) + 𝟐(𝐲𝟐 + 𝐲𝟒 + … … … + 𝐲𝐧 𝟐 )]
𝟑
𝟑𝒉
I= [ (𝐲𝟎 + 𝐲𝐧 ) + 𝟑(𝐲𝟏 + 𝐲𝟐 + 𝐲𝟒 + 𝐲𝟓 + … … … + 𝐲𝐧 𝟏 ) + 𝟐(𝐲𝟑 + 𝐲𝟔 + … … … + 𝐲𝐧 𝟑 )]
𝟖
= 216
Weddle’s rule:
𝟑𝒉
I= [ (𝐲𝟎 + 𝐲𝟔 ) + 𝟓(𝐲𝟏 + 𝐲𝟓 ) + (𝐲𝟐 + 𝐲𝟒 ) + 𝟔𝐲𝟑 ]
𝟏𝟎
3
= [ (0 + 108) + 5(3 + 75) + (12 + 48) + 6(27)]
10
= 216
Exact Method:
I = ∫ 3x dx = [𝑥 ] = 6 − 0 = 216
39
DAYANANDA SAGAR COLLEGE OF ENGINEERING
(An Autonomous Institute Affiliated to VTU, Belagavi)
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078
DEPARTMENT OF MATHEMATICS
EXERCISES:
x 0 2 4 6
y -4 2 14 158
x 5 6 9 11
y 12 13 14 16
3. Use Lagrange’s interpolation formula to fit a polynomial for the data given and find f(2)
x 0 1 3 4
y -12 0 6 12
x 1 3 4 6
y 3 9 30 132
5. Use Lagrange’s interpolation formula, to find the polynomial of the form x = f(y) and find x(5)
x 2 10 17
y 1 3 4
6. Use Lagrange’s Inverse interpolation formula to find the value of x for y = 100, given
x 3 5 7 9 11
y 6 24 58 108 174
7. Use Lagrange’s interpolation formula to fit a polynomial for the data given
x 1 2 4 5
y 14 41 197 350
40
DAYANANDA SAGAR COLLEGE OF ENGINEERING
(An Autonomous Institute Affiliated to VTU, Belagavi)
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078
DEPARTMENT OF MATHEMATICS
8. Evaluate ∫ dx dividing the interval into six equal parts by applying Weddle’s rule and
deduce an approximate value of log 2
9. Use (i) Simpson’s 1/3rd rule (ii) Simpson’s 3/8th rule (c) Weddle’s rule to compute the
area bounded by the curve y = f(x), x-axis and the extreme ordinates from the following
table.
x 0 1 2 3 4 5 6
y 0 2 2.5 2.3 2 1.7 1.5
ANSWERS:
1. 40 2. 14.67 3. x − 7x + 18x − 12 ; 4 4. ( 4x − 2x − 29x + 42 )
9. 11.49
41