Unit-3
Numerical Integration and Differentiation
Newton’s forward Difference formula:
This method is useful for interpolation near the beginning of a set of tabular values.
Where
Differentiating both side with respect to p, we get
h
This formula is applicable to compute the value of for non tabular values of x.
For tabular values of x , we can get formula by putting
Therefore
In similar manner we can get the formula for higher order by differentiating the previous order formulas
Again differentiating with respect to p, we get
Hence
Also
And so on.
Example1: Given that
X | 1.0 | 1.1 | 1.2 | 1.3 |
Y | 0.841 | 0.891 | 0.932 | 0.963 |
Find at .
Here the first derivative is to be calculated at the beginning of the table, therefore forward difference formula will be used
Forward difference table is given below:
X | Y | |||
1.0
1.1
1.2
1.3 | 0.841
0.891
0.932
0.962 |
0.050
0.041
0.031 |
-0.009
-0.010 |
-0.001 |
By Newton’s forward differentiation formula for differentiation
Here
Example2: Find the first and second derivatives of the function given below at the point :
X | 1 | 2 | 3 | 4 | 5 |
Y | 0 | 1 | 5 | 6 | 8 |
Here the point of the calculation is at the beginning of the table,
Forward difference table is given by:
X | Y | ||||
1
2
3
4
5 | 0
1
5
6
8 |
1
4
1
2 |
3
-3
1 |
-6
4
|
-10
|
By Newton’s forward differentiation formula for differentiation
Here , 0.
Again
At
Example3: From the following table of values of x and y find for
X | 1.00 | 1.05 | 1.10 | 1.15 | 1.20 | 1.25 | 1.30 |
Y | 1.0000 | 1.02470 | 1.04881 | 1.07238 | 1.09544 | 1.11803 | 1.14017 |
Here the value of the derivative is to be calculated at the beginning of the table.
Forward difference table is given by
X | Y | ||||||
1.00
1.05
1.10
1.15
1.20
1.25
1.30 | 1.0000
1.02470
1.04881
1.07238
1.09544
1.11803
1.14017 |
0.02470
0.02411
0.02357
0.02306
0.02259
0.02214 |
-0.00059
-0.00054
-0.00051
-0.00047
-0.00045 |
0.00005
0.00003
0.00004
0.00002 |
-0.00002
0.00001
-0.00002 |
0.00003
-0.00003 |
-0.00006 |
From Newton’s forward difference formula for differentiation we get
Here
=0.48763
Newton Backward Difference Method:
This method is useful for interpolation near the ending of a set of tabular values.
Where
Differentiating both side with respect to p, we get
This formula is applicable to compute the value of for non tabular values of x.
For tabular values of x , we can get formula by putting
Therefore
In similar manner we can get the formula for higher order by differentiating the previous order formulas
Differentiating both side with respect to p, we get
Also
Example1: Given that
X | 0.1 | 0.2 | 0.3 | 0..4 |
Y | 1.10517 | 1.22140 | 1.34986 | 1.49182 |
Find ?
Backward difference table:
X | Y | |||
0.1
0.2
0.3
0.4 | 1.10517
1.22140
1.34986
1.49182 |
0.11623
0.12846
0.14196 |
0.01223
0.01350 |
0.00127 |
Newton’s Backward formula for differentiation
Here
Example2: Given that
X | 1.0 | 1.2 | 1.4 | 1.6 | 1.8 | 2.0 |
Y | 0 | 0.128 | 0.544 | 1.296 | 2.432 | 4.0 |
Find the derivative of y at ?
The difference table is given below:
X | Y | ||||
1.0
1.2
1.4
1.6
1.8
2.0 | 0
0.128
0.544
1.296
2.432
4.0 |
0.128
0.416
0.752
0.136
1.568
|
0.288
0.336
0.384
0.432 |
0.048
0.048
0.048 |
0
0 |
Since the point is at the beginning of the table therefore
From Newton’s forward difference formula for differentiation, we get
Here
Since the point is at the end of the table therefore
Backward difference table is:
X | Y | ||||
1.0
1.2
1.4
1.6
1.8
2.0 | 0
0.128
0.544
1.296
2.432
4.000 |
0.128
0.416
0.752
0.136
1.568 |
0.288
0.336
0.384
0.432 |
0.048
0.048
0.048 |
0
0 |
Newton’s Backward formula for differentiation
Key takeaways-
Stirling’s formula-
Stirling’s formula is defined as-
Note-
Example: By using stirling formula to find , given-
Sol.
Suppose the origin is at 30 and h = 5
a + hu = 28
Where h = 5 and a = 35 then-
u = -0.4
The difference table will be as follows-
U | X | y | ||||
-2
-1
0
1
2 | 20
25
30
35
40 | 49225
48316
47236
45926
44306 |
-909
-1080
-1310
-1620 |
-171
-230
-310 |
-59
-80 |
-21 |
By using stirling formula, we get-
= 47691.8256
So that, we have
Example: By using stirling’s formula, compute from the table given below
10 | 11 | 12 | 13 | 14 | |
23.967 | 28.060 | 31.788 | 35.209 | 38.368 |
Sol.
Here let the origin is at , h = 1,
u | y | ||||
-2
-1
0
1
2 | 0.23967
0.28060
0.31788
0.35209
0.38368
|
0.04093
0.03728
0.034121
0.03159
|
-0.00365
-0.00307
-0.00062
|
0.00058
-0.00045
|
-0.00013
|
Then using stirling’s formula-
Bessel’s formula-
The formula given below is called Bessel’s formula-
Note- this formula is useful when u =1/2 and gives best estimates when ¼<u<3/4
Example: By using Bessel’s formula to find . Given
Sol.
The central difference table-
U | Y | |||
-1
0
1
2 | 2854
3162
3544
3992 |
308
382
448
|
74
66
|
-8
|
By using Bessel’s formula-
We get-
Everette’s formula-
The Everette’s formula is defined as-
Here w = 1 – u,
When u > ½, it gives best estimate.
Example: By using Everette’s formula, Evaluate f(30) if
F(20) = 2854, f(28) = 3162
F(36) = 7088, f(44) = 7984
Sol.
Lets origin is 28,
A = 28, h = 8
A +hu = 30
28 + 8u = 30
U = 0.25
And w = 1-u = 1-0.25 = 0.75
The difference table is-
U | y | |||
-1
0
1
2 | 2854
3162
3544
3992 |
308
382
448
|
3618
-3030
|
-6648
|
By using Everette’s formula-
So that the value of f(30) = 4064
Key takeaways-
2. Bessel’s formula-
3. Everette’s formula-
3.3 Lagrange’s Interpolation and Newton Divided difference formula
Divided Difference:
In the case of interpolation, when the value of the arguments are not equi-spaced (unequal intervals) we use the class of differences called divided differences.
Definition: The difference which are defined by taking into consideration the change in the value of the argument are known as divided differences.
Let be a function defined as
……. | ||||
|
|
|
………… |
|
Where are unequal i.e. it is case of unequal interval.
The first order divided differences are:
And so on.
The second order divided difference is:
And so on.
Similarly the nth order divided difference is:
With the help of these we construct the divided difference table:
X | f(x) | ||
|
|
|
|
Newton’s Divided difference Formula:
Let be a function defined as
……. | ||||
|
|
|
………… |
|
Where are unequal i.e. it is case of unequal interval.
.
Example1: By means of Newton’s divided difference formula, find the values of from the following table:
x | 4 | 5 | 7 | 10 | 11 | 13 |
f(x) | 48 | 100 | 294 | 900 | 1210 | 2028 |
We construct the divided difference table is given by:
X | f(x) | First order divide difference | Second order divide difference | Third order divide difference | Fourth order divide difference |
4
5
7
10
11
13 | 48
100
294
900
1210
2028 |
|
|
|
0
0 |
By Newton’s Divided difference formula
.
Now, putting in above we get
.
Example2: The following values of the function f(x) for values of x are given:
Find the value of and also the value of x for which f(x) is maximum or minimum.
We construct the divide difference table:
x | f(x) | First order divide difference | Second order divide difference | Third order divide difference |
1
2
7
8 | 4
5
5
4 |
|
|
0 |
By Newton’s divided difference formula
.
Putting in above we get
For maximum and minimum of , we have
Or
Example3: Find a polynomial satisfied by
, by the use of Newton’s interpolation formula with divided difference.
x | -4 | -1 | 0 | 2 | 4 |
F(x) | 1245 | 33 | 5 | 9 | 1335 |
Here
We will construct the divided difference table:
X | F(x) | First order divided difference | Second order divided difference | Third order divided difference | Fourth order divided difference |
-4
-1
0
2
4 | 1245
33
5
9
1335 |
|
|
|
|
By Newton’s divided difference formula
.
This is the required polynomial.
Lagrange interpolation
Given a set of values of x and y, the process of finding the value of x for a certain value of y is called inverse interpolation.
Lagrange’s Inverse interpolation:
Let , be defined function we get
x | ….. | ||||
f(Y) | …… |
Where the interval is not necessarily equal. We assume f(x) is a polynomial of degree n. Then Lagrange’s inverse interpolation formula is given by
Example1: Use the inverse interpolation to find value of x at for the following data:
X | 1 | 3 | 4 |
Y | 4 | 12 | 19 |
Here , we have the data
The Lagrange’s inverse interpolation formula is given by
.
Example2: Use the inverse Lagrange’s method to find the root of the equation , give data
X | 30 | 34 | 38 | 42 |
F(x) | -30 | -13 | 3 | 18 |
Here , we have the data
Also.
The Lagrange’s inverse interpolation formula is given by
Thus, the approximate root of the given equation is .
Example3: Find the value of x at for the following data:
X | 1 | 2 | 4 | 5 | 8 |
Y | 1.000 | 0.500 | 0.250 | 0.200 | 0.125 |
Here , we have the data
Also.
The Lagrange’s inverse interpolation formula is given by
Thus, the value.
Key takeaways-
Lagrange’s inverse interpolation formula is given by
Numerical Integration
Numerical integration is a process of evaluating or obtaining a definite integral from a set of numerical values of the integrand f(x).In case of function of single variable, the process is called quadrature
Newton cotes formula-
Suppose where y takes the values
And let the integration interval (a, b) is divided into n equal sub-intervals, each of width h = b – a /n, so that,
The above formula is known as Newton’s cotes formula.
This is also known as general quadrature formula.
Trapezoidal Method:
Let the interval be divided into n equal intervals such that <<…. <=b.
Here.
To find the value of.
Setting n=1, we get
Or I=
The above is known as Trapezoidal method.
Note: In this method second and higher difference are neglected and so f(x) is a polynomial of degree 1.
Geometrical Significance: The curve y=f(x), is replaced by n straight lines with the points ();() and ();…….;() and ().
The area bounded by the curve y=f(x), the ordinates, and the x axis is approximately equivalent to the sum of the area of the n trapeziums obtained.
Example1: State the trapezoidal rule for finding an approximate area under the given curve. A curve is given by the points (x, y) given below:
Estimate the area bounded by the curve, the x axis and the extreme ordinates.
We construct the data table:
X | 0 | 0.5 | 1.0 | 1.5 | 2.0 | 2.5 | 3.0 | 3.5 | 4.0 |
Y | 23 | 19 | 14 | 11 | 12.5 | 16 | 19 | 20 | 20 |
Here length of interval h =0.5, initial value a = 0 and final value b = 4
By Trapezoidal method
Area of curve bounded on x axis =
Example2: Compute the value of ?
Using the trapezoidal rule with h=0.5, 0.25 and 0.125.
Here
For h=0.5, we construct the data table:
X | 0 | 0.5 | 1 |
Y | 1 | 0.8 | 0.5 |
By Trapezoidal rule
For h=0.25, we construct the data table:
X | 0 | 0.25 | 0.5 | 0.75 | 1 |
Y | 1 | 0.94117 | 0.8 | 0.64 | 0.5 |
By Trapezoidal rule
For h = 0.125, we construct the data table:
X | 0 | 0.125 | 0.25 | 0.375 | 0.5 | 0.625 | 0.75 | 0.875 | 1 |
Y | 1 | 0.98461 | 0.94117 | 0.87671 | 0.8 | 0.71910 | 0.64 | 0.56637 | 0.5 |
By Trapezoidal rule
[(1+0.5) +2(0.98461+0.94117+0.87671+0.8+0.71910+0.64+0.56637)]
Example3: Evaluate, using trapezoidal rule with five ordinates
Here
We construct the data table:
X | 0 | |||||
Y | 0 | 0.3693161 | 1.195328 | 1.7926992 | 1.477265 | 0 |
Simpson’s Rule:
Let the interval be divided into n equal intervals such that <<…. <=b.
Here.
To find the value of.
Setting n = 2,
Which is known as Simpson’s 1/3- rule or Simpson’s rule.
Note: In this rule third and higher differences are neglected a so f(x) is a polynomial of degree 2.
Example1: Estimate the value of the integral
By Simpson’s rule with 4 strips and 8 strips respectively.
For n=4, we have
Construct the data table:
X | 1.0 | 1.5 | 2.0 | 2.5 | 3.0 |
Y=1/x | 1 | 0.66666 | 0.5 | 0.4 | 0.33333 |
By Simpson’s Rule
For n = 8, we have
X | 1 | 1.25 | 1.50 | 1.75 | 2.0 | 2.25 | 2.50 | 2.75 | 3.0 |
Y=1/x | 1 | 0.8 | 0.66666 | 0.571428 | 0.5 | 0.444444 | 0.4 | 0.3636363 | 0.333333 |
By Simpson’s Rule
Example2: Evaluate
Using Simpson’s 1/3 rule with .
For , we construct the data table:
X | 0 | ||||||
0 | 0.50874 | 0.707106 | 0.840896 | 0.930604 | 0.98281 | 1 |
By Simpson’s Rule
Example3: Using Simpson’s 1/3 rule with h = 1, evaluate
For h = 1, we construct the data table:
X | 3 | 4 | 5 | 6 | 7 |
9.88751 | 22.108709 | 40.23594 | 64.503340 | 95.34959 |
By Simpson’s Rule
= 177.3853
Simpson’s 3/8 rule
Let the interval be divided into n equal intervals such that <<…. <=b.
Here.
To find the value of .
Setting n=3, we get
Is known as Simpson’s 3/8 rule which is not as accurate as Simpson’s rule.
Note: In this rule the fourth and higher differences are neglected and so f(x) is a polynomial of degree 3.
Example1: Evaluate
By Simpson’s 3/8 rule.
Let us divide the range of the interval [4, 5.2] into six equal parts.
For h=0.2, we construct the data table:
X | 4.0 | 4.2 | 4.4 | 4.6 | 4.8 | 5.0 | 5.2 |
1.3863 | 1.4351 | 1.4816 | 1.5261 | 1.5686 | 1.6094 | 1.6487 |
By Simpson’s 3/8 rule
= 1.8278475
Example2: Evaluate
Let us divide the range of the interval [0,6] into six equal parts.
For h=1, we construct the data table:
X | 0 | 1 | 2 | 3 | 4 | 5 | 6 |
1 | 0.5 | 0.2 | 0.1 | 0.0588 | 0.0385 | 0.027 |
By Simpson’s 3/8 rule
+3(0.0385) +0.027]
=1.3571
Error in Integration
Error in Trapezoidal method
The total error in trapezoidal method is given by
Let is the largest value of the n quantities on the right-hand side of the above equation then
Error in Simpson’s Rule
The error in the Simpson’s rule is given by
Where is the largest value of the fourth derivative of y(x)
Error in Simpson’s 3/8 Rule
The error in this rule is given by
Where is the largest value of the derivative of y(x)
Boole’s rule & Waddle’s rule-
The formula given below is known as Boole’s rule-
And the waddle’s rule is defined as-
Example: A river is 80 m wide. The depth ‘b’ of the river at a distance ‘a’ from one bank is given by the table-
a | 0 | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 |
B | 0 | 4 | 7 | 9 | 12 | 15 | 14 | 8 | 3 |
Find the approximate area of cross-section of the river using Boole’s rule.
Sol.
The area of the cross-section of the river will be-
The number of sub-intervals here is 8.
Then by Boole’s rule-
So that the area of the cross-section of the river is 708 square meters.
Example: Evaluate by using Boole’s.
Sol.
Take h = , so that there four sub intervals-
X | 1 | 2 | 3 | 4 | 5 |
F(x) | 1 | ½ | 1/3 | ¼ | 1/5 |
Using Boole’s method-
Key takeaways-
2. Simpson’s Rule:
3. Simpson’s 3/8 rule
4. Boole’s rule & Waddle’s rule-
The formula given below is known as Boole’s rule-
And the waddle’s rule is defined as-
References