NA Lecture 28 (AUK)
NA Lecture 28 (AUK)
Analysis
Lecture 28
Chapter 7
Numerical
Differentiation
and Integration
INTRODUCTION
DIFFERENTIATION USING
DIFFERENCE OPREATORS
DIFFERENTIATION USING
INTERPOLATION
RICHARDSON’S
EXTRAPOLATION METHOD
NUMERICAL INTEGRATION
NEWTON-COTES
INTEGRATION FORMULAE
THE TRAPEZOIDAL RULE
( COMPOSITE FORM )
SIMPSON’S RULES
( COMPOSITE FORM )
ROMBERG’S INTEGRATION
DOUBLE INTEGRATION
DIFFERENTIATION USING
DIFFERENCE OPREATORS:
Applications:
Remember Using forward difference
operator ∆, the shift operator , the
backward difference operator and the
average difference operator , we obtained
the following formulae:
Dy0 y0
1 y0 y0 y0
2 3 4
y0
h 2 3 4
2
d y0
D y0
2
2
y0
dx
2 y0 3 y 0
1
2 11 4 5 5
h y0 y0
12 6
d
yn Dyn yn
dx
1 2 yn 3 y n 4 y n
yn
h 2 3 4
yn D 2 yn
1 11 4 5 5
2 yn yn y n y n
2 3
h 12 6
1 2 1 4 1 6
y D y 2 y y y
2
h 12 90
d
y y Dy
dx
1 1 3 3 5
y y y
h 24 640
Recall from what we mentioned in the
last lecture that for calculating the
second derivative at an interior tabular
point, we use the equation
1 2 1 4 3 6
D 2
2
h 12 90
while for computing the first derivative at
an interior tabular point, we in general use
another convenient form for D, which is
derived as follows. Multiply the right hand
side of
d
y y Dy
dx
1 1 3 3 5
y y y
h 24 640
by
1 ( 4)
2
which is unity and noting the
Binomial expansion
1 2
1 2 1 2
1 1
4 8
3 4 15
6
128 48 64
we
we get
get
1 2 3 4
D 1
h 8 128
1 3 3 5
24 640
simplification
simplification we
we get
get
1 3 4 5
D
h 6 120
Therefore the equation can also be
written in another useful form as
1 3 1 5
y D y y y
h 6 30
The last two equations y” and
y’ respectively are known as
Stirling’s formulae for
computing the derivatives of a
tabular function. Similar
formulae can be derived for
computing higher order
derivatives of a tabular
function.
The equation for y’ can also
be written as
1 3 2
(1) (2) 52 2
y y y y
h 3! 5!
2 2
(1) (2) (3) 7 2
y
7!
In order to illustrate the
use of formulae derived
so far, for computing the
derivatives of a tabulated
function, we consider the
Following example :
Example:
Compute f (0) and f (0.2)
from the following
tabular data.
x f ( x)
0.0 1.00
0.2 1.16
0.4 3.56
0.6 13.96
0.8 41.96
1.0 101.00
Solution Since x = 0 and
0.2 appear at and near
beginning of the table, it is
appropriate to use formulae
based on forward differences
to find the derivatives. The
difference table for the given
data is depicted below:
x f ( x) f ( x) f ( x)
2
f ( x)
3
f ( x)
4
5 f ( x)
0.0 1.00
0.16
0.2 1.16 2.24
2.40
0.4 3.56 5.76
8.00 3.84
10.40
0.6 13.96 9.60 0.0
17.60
28.00 3.84
0.8 41.96 13.44
31.04
59.04
1.0 101.00
Using forward
difference formula
for D f ( x),
2
i.e
1 f ( x) f ( x)
2 3
D f ( x) 2
2
h
11 4 5 5
f ( x) f ( x)
12 6
We obtain
1 11
f (0) 2 2.24 5.76 (3.84)
(02) 12
5
(0) 0.0
6
Also, using the formula for
Df ( x) we have
1 f ( x)
2
Df ( x) f ( x)
h 2
f ( x) f ( x)
3 4
3 4
Hence,
1 8.00
f (0.2) 2.40
0.2 2
9.60 3.84
3.2
3 4
Example Find y(2.2)
and y (2.2) from the
table x y( x )
1.4 4.0552
1.6 4.9530
1.8 6.0496
2.0 7.3891
2.2 9.0250
Solution:
1.4 4.0552
0.8978
1.6 4.9630 0.1988
1.0966 0.0441
0.0094
1.8 6.0496 1.3395 0.2429 0.0535
2.0 7.3891 1.6359 0.2964
2.2 9.0250
Using backward difference
formulae for y ( x ) and y ( x ),
we have
1 yn y n y n
2 3 4
yn yn
h 2 3 4
Therefore,
1 0.2964 0.0535
y(2.2) 1.6359
0.2 2 3
0.0094
5(1.8043) 9.0215
4
Also
1 2 11 4
yn 2 y n 3
y n y n
h 12
Therefore,
1
y(2.2) 2
0.2964 0.0535
(0.2)
11
(0.0094)
12
25(0.3585) 8.9629
Case IV: Derivation of Two
and three point formulae:
Retaining only the first term in
equation :
1 y0 y0 y0
2 3 4
Dy0 y0 y0
h 2 3 4
we can get another useful
form for the first derivative as
yi yi 1 yi
yi
h h
y ( xi h) y ( xi )
h
Similarly, by retaining only
the first term in Eqn.
d 1 2 y n 3 yn 4 y n
yn Dyn yn yn
dx h 2 3 4
yi yi yi 1
yi
h h
y ( xi ) y ( xi h)
h
Adding the last two equations, we
have
y ( xi h) y ( xi h)
yi
2h
These Equations constitute two-
point formulae for the first
derivative. By retaining only the
first term in Equation ,
2 11 4
2 y0 y0 y0
3
d y0 1 12
D y0
2
2
y
0 2
dx h 5 5
y 0
6
We get
yi yi 2 2 yi 1 yi
2
yi 2 2
h h
y ( xi 2h) 2 y ( xi h) y ( xi )
2
h
Similarly, we have
yi
2
yi 2
h
y ( xi ) 2 y ( xi h) y ( xi 2h)
2
h
While retaining only the first
term in the expression for y” in
terms of we obtain
yi yi (1 2) yi (1 2)
2
yi 2 2
h h
yi 1 2 yi yi 1
2
h
y ( xi h) 2 y ( xi ) y ( xi h)
2
h
The last three equations
constitute three-point formulae
for computing the second
derivative. We shall see later
that these two- and three-point
formulae become handy for
developing extrapolation
methods to numerical
differentiation and integration.
Numerical
Analysis
Lecture 28