Study Material Numerical Differentiation and Integration
1. Page | 1
VIVEKANANDA COLLEGE, TIRUVEDAKAM WEST
(Residential & Autonomous โ A Gurukula Institute of Life-Training)
(Affiliated to Madurai Kamaraj University)
PART III: PHYSICS MAJOR โ FOURTH SEMESTER-CORE SUBJECT PAPER-II
NUMERICAL METHODS โ 06CT42
(For those who joined in June 2018 and after)
Reference Text Book: Numerical Methods โ P.Kandasamy, K.Thilagavathy & K.Gunavathi,
S.Chand & Company Ltd., New Delhi, 2014.
UNIT โ IV Numerical Differentiation and Integration
Numerical Differentiation
Introduction
We found the polynomial curve y = f (x), passing through the (n+1) ordered pairs (xi, yi), i=0, 1,
2โฆn. Now we are trying to find the derivative value of such curves at a given x = xk (say), whose x0 <
xk < xn.
To get derivative, we first find the curve y = f (x) through the points and then differentiate and get its
value at the required point.
If the values of x are equally spaced. We get the interpolating polynomial due to Newton-Gregory.
โข If the derivative is required at a point nearer to the starting value in the table, we use
Newtonโs forward interpolation formula.
โข If we require the derivative at the end of the table, we use Newtonโs backward interpolation
formula.
โข If the value of derivative is required near the middle of the table value, we use one of the
central difference interpolation formulae.
Newtonโs forward difference formula to get the derivative
Newtonโs forward difference interpolation formula is
๐ฆ (๐ฅ0 + ๐ขโ) = ๐ฆ๐ข = ๐ฆ0 + ๐ขโ๐ฆ0 +
๐ข(๐ข โ 1)
2!
โ2
๐ฆ0 +
๐ข(๐ข โ 1)(๐ข โ 2)
3!
โ3
๐ฆ0 + โฏ
where ๐ฆ (๐ฅ) is a polynomial of degree ๐ ๐๐ ๐ฅ ๐๐๐ ๐ข =
๐ฅ โ ๐ฅ0
โ
where โ ๐s interval of differencing
The values of first and second derivative at the starting value ๐ฅ = ๐ฅ0 for given by
(
๐๐ฆ
๐๐ฅ
)
๐ฅ=๐ฅ0
=
1
โ
[โ ๐ฆ0 โ
1
2
โ2
๐ฆ0 +
1
3
โ3
๐ฆ0 โ โฏ ]
(
๐2
๐ฆ
๐๐ฅ2
)
๐ฅ=๐ฅ0
=
1
โ2
[โ2
๐ฆ0 โ โ3
๐ฆ0 +
11
12
โ4
๐ฆ0 โ โฏ ]
2. Page | 2
Problems:
1. The table given below revels the velocity v of a body during the time โtโ specified. find its
acceleration at t = 1.1
t : 1.0 1.1 1.2 1.3 1.4
v : 43.1 47.7 52.1 56.4 60.8
๐๐จ๐ฅ๐ฎ๐ญ๐ข๐จ๐ง. ๐ฃ is dependent on time ๐ก ๐. ๐. , ๐ฃ = ๐ฃ(๐ก). we require acceleration =
๐๐ฃ
๐๐ก
.
therefore, we have to find ๐ฃโฒ(1.1).
๐ด๐
๐๐ฃ
๐๐ก
๐๐ก ๐ก = 1.1 is require, (nearer to beginning value), we use ๐๐๐ค๐ก๐๐ ๐๐๐๐ค๐๐๐ ๐๐๐๐๐ข๐๐.
๐ฃ(๐ก) = ๐ฃ (๐ฅ0 + ๐ขโ) = ๐ฃ0 + ๐ขโ๐ฃ0 +
๐ข(๐ข โ 1)
2!
โ2
๐ฃ0 +
๐ข(๐ข โ 1)(๐ข โ 2)
3!
โ3
๐ฃ0 + โฏ
๐๐ฃ
๐๐ก
=
1
โ
.
๐๐ฃ
๐๐ก
=
1
โ
[โ๐ฃ0 +
2๐ข โ 1
2
โ2
๐ฃ0 +
3๐ข2
โ 6๐ข + 2
6
โ3
๐ฃ0 + โฏ ]
where ๐ข =
๐ก โ ๐ก0
โ
=
1.1 โ 1.0
0.1
= 1
(
๐๐ฃ
๐๐ก
)
๐ก=1.1
= (
๐๐ฃ
๐๐ก
)
๐=1
=
1
0.1
[4.6 +
1
2
(โ0.2) +
1
6
(0.1) +
1
12
(0.1)]
= 10[4.6 โ 0.1 โ 0.0166 + 0.0083]
= ๐๐. ๐๐๐
t
1.0
1.1
1.2
1.3
1.4
v
43.1
47.7
52.1
56.4
60.8
โ๐ฃ
4.6
4.4
4.3
4.4
โ2
๐ฃ
-0.2
-0.1
0.1
โ3
๐ฃ
0.1
0.2
โ4
๐ฃ
0.1
3. Page | 3
2. Derive the Newtonโs forward difference formula to get the derivative.
We are given (๐ + 1)ordered pairs (๐ฅ๐, ๐ฆ๐)๐ = 0, 1, โฆ ๐. we want to find the derivative of
๐ฆ = ๐(๐ฅ) passing through the (๐ + 1) points, at a point near to the startinng value ๐ฅ = ๐ฅ0
Newtonโs forward difference interpolation formula is
๐ฆ (๐ฅ0 + ๐ขโ) = ๐ฆ๐ข = ๐ฆ0 + ๐ขโ๐ฆ0 +
๐ข(๐ข โ 1)
2!
โ2
๐ฆ0 +
๐ข(๐ข โ 1)(๐ข โ 2)
3!
โ3
๐ฆ0 + โฏ โฆ (1)
where ๐ฆ (๐ฅ) is a polynomial of degree ๐ ๐๐ ๐ฅ ๐๐๐ ๐ข =
๐ฅ โ ๐ฅ0
โ
Differentiating ๐ฆ(๐ฅ) w. r. t. ๐ฅ,
๐๐ฆ
๐๐ฅ
=
๐๐ฆ
๐๐ข
.
๐๐ข
๐๐ฅ
=
1
โ
.
๐๐ฆ
๐๐ข
๐๐ฆ
๐๐ฅ
=
1
โ
[โ๐ฆ0 +
2๐ข โ 1
2
โ2
๐ฆ0 +
3๐ข2
โ 6๐ข + 2
6
โ3
๐ฆ0 +
(4๐ข3
โ 18๐ข2
+ 22๐ข โ 6)
24
โ4
๐ฆ0] โฆ . (2)
Equation (2) gives the value of
๐๐ฆ
๐๐ฅ
at general ๐ฅ which may be anywhere in the interval.
In special case like ๐ฅ = ๐ฅ0, ๐. ๐. , ๐ข = 0 ๐๐ (2)
(
๐๐ฆ
๐๐ฅ
)
๐ฅ=๐ฅ0
= (
๐๐ฆ
๐๐ฅ
)
๐ข=0
=
1
โ
[โ๐ฆ0 +
1
2
โ2
๐ฆ0 +
1
3
โ3
๐ฆ0 โ
1
4
โ4
๐ฆ0 + โฏ ] โฆ (3)
Differentiating (2) again w. r. t. ๐ฅ,
๐2
๐ฆ
๐๐ฅ2
=
๐
๐๐ข
(
๐๐ฆ
๐๐ฅ
) .
๐๐ข
๐๐ฅ
=
๐
๐๐ข
(
๐๐ฆ
๐๐ฅ
) .
1
โ
๐2
๐ฆ
๐๐ฅ2
=
1
โ2
[โ2
๐ฆ0 + (๐ข โ 1)โ3
๐ฆ0 +
(6๐ข2
โ 18๐ข + 11)
12
โ4
๐ฆ0 + โฏ ] โฆ (4)
Equation (4) give the second derivative value at ๐ฅ = ๐ฅ.
setting ๐ฅ = ๐ฅ0 ๐. ๐. , ๐ข = 0 ๐๐ (4)
(
๐2
๐ฆ
๐๐ฅ2
)
๐ฅ=๐ฅ0
=
1
โ2
[โ2
๐ฆ0 โ โ3
๐ฆ0 +
11
12
โ4
๐ฆ0 + โฏ ] โฆ (5)
This equation (5) give the value of second derivative at the starting value ๐ฅ = ๐ฅ0
3. ๐๐ก๐ ๐ญ๐๐๐ฅ๐ ๐๐๐ฅ๐จ๐ฐ ๐ ๐ข๐ฏ๐๐ฌ ๐ญ๐ก๐ ๐ซ๐๐ฌ๐ฎ๐ฅ๐ญ๐ฌ ๐จ๐ ๐๐ง ๐จ๐๐ฌ๐๐ซ๐ฏ๐๐ญ๐ข๐จ๐ง: ๐ ๐ข๐ฌ ๐ญ๐ก๐ ๐จ๐๐ฌ๐๐ซ๐ฏ๐๐ ๐ญ๐๐ฆ๐ฉ๐๐ซ๐๐ญ๐ฎ๐ซ๐ ๐ข๐ง
๐๐๐ ๐ซ๐๐๐ฌ ๐๐๐ง๐ญ๐ซ๐ข๐ ๐ซ๐๐๐ ๐จ๐๐ ๐ฏ๐๐ฌ๐ฌ๐๐ฅ ๐จ๐ ๐๐จ๐จ๐ฅ๐ข๐ง๐ ๐ฐ๐๐ญ๐๐ซ; ๐ญ ๐ข๐ฌ ๐ญ๐ก๐ ๐ญ๐ข๐ฆ๐ ๐ข๐ง ๐ฆ๐ข๐ง๐ฎ๐ญ๐๐ฌ ๐๐ซ๐จ๐ฆ ๐ญ๐ก๐
๐๐๐ ๐ข๐ง๐ง๐ข๐ง๐ ๐จ๐ ๐จ๐๐ฌ๐๐ซ๐ฏ๐๐ญ๐ข๐จ๐ง.
๐ ๐ข๐ง๐ ๐ญ๐ก๐ ๐๐ฉ๐ฉ๐ซ๐จ๐ฑ๐ข๐ฆ๐๐ญ๐ ๐ซ๐๐ญ๐ ๐จ๐ ๐๐จ๐จ๐ฅ๐ข๐ง๐ ๐๐ญ ๐ = ๐ ๐๐๐ ๐. ๐
t :
๐ฝ :
1
85.3
3
74.5
5
67.0
7
60.5
9
54.3
12. Page | 12
ii) Since n = 6, we can use Simpsonโฒ
s rule
๐ต๐ฆ ๐๐๐๐๐ ๐๐โฒ
๐ ๐๐๐ โ ๐กโ๐๐๐ ๐๐ข๐๐
๐ผ =
0.2
3
[(1.3862944 + 1.6486586 + 2(1.4816045 + 1.5686159)
+ 4(1.4350845 + 1.5260563)]
= ๐. ๐๐๐๐๐๐๐๐
๐๐๐) ๐ต๐ฆ ๐๐๐๐๐๐๐ ๐๐โฒ
๐ ๐กโ๐๐๐ โ ๐๐๐โ๐กโ๐ ๐๐ข๐๐,
๐ผ =
3(0.2)
8
[(1.3862944 + 1.6486586)
+ 3(1.4350845 + 1.4816045 + 1.5686159 + 1.6094379 + 2(1.5260563)]
= ๐. ๐๐๐๐๐๐๐๐
Short Answer:
1. Write down the Newton-Coteโs quadrature formula.
โซ ๐(๐ฅ) ๐๐ฅ โ โ [๐๐ฆ0 +
๐2
2
โ๐ฆ0 +
1
2
(
๐3
3
โ
๐2
2
) โ2
๐ฆ0 +
1
6
(
๐4
4
โ ๐3
+ ๐2
) โ3
๐ฆ0 + โฏ ]
๐ฅ ๐
๐ฅ0
This equation is called ๐๐๐ค๐ก๐๐ โ ๐ถ๐๐ก๐โฒ
๐ ๐๐ข๐๐๐๐๐ก๐ข๐๐ ๐๐๐๐๐ข๐๐.
2. What is the nature of y (x) in the case of trapezoidal rule?
In trapezoidal rule, y (x) is a linear function of x.
3. State the nature of y (x) and number of intervals in the case of Simpsonโs one-third rule?
In Simpsonโs one-third rule, y (x) is a polynomial of degree two. To apply this rule n, the number of
intervals must be even.
4. What is the nature of y (x) in the case of Simpsonโs three-eighths rule and when it is
applicable?
In Simpsonโs third-eighths rule, y (x) is a polynomial of degree three. This rule is applicable if n, the
number of intervals is a multiple of 3.
5. Differentiate between Simpsonโs one-third rule and Simpsonโs three-eighths rule.
S.No Simpsonโs one-third rule Simpsonโs three-eighths rule
1 y (x) is a polynomial of degree two y (x) is a polynomial of degree three
2 The number of intervals must be even. The number of intervals is a multiple of 3.