296
COMPUTER BASED NUMERICAL AND STATISTICAL TECHNIQUES
Aliter: We know that
+∆= = =,
hD
d
IEeD
dx
∴
log(1 )hD =+∆
∆∆∆∆∆
=∆−+−+−+
23456
23456
or
∆∆∆∆∆
=∆−+−+−+
23456
1
23456
D
h
(1)
⇒
2
23456
2
2
1
23456
D
h
∆∆∆∆∆
= ∆−+−+−+
=∆−∆+∆
23 4
2
111
12
h
(2)
also
∆∆∆
= ∆−+−+
3
234
3
3
1
234
D
h
=∆−∆+
34
3
13
2
h
(3)
Applying equations (1), (2) and (3) for
0,
y
we get
=
=∆−∆+∆−∆+
0
234
0000
1111
234
xx
dy
yyyy
dx h
and
=
=∆−∆+∆−
0
2
23 2
00 0
22
111
12
xx
dy
yy y
dx h
=
=∆−∆+
0
3
34
00
33
13
2
y
xx
d
yy
dx h
6.2.2 Derivatives Using Newton’s Backward Difference Formula
Newton’s backward interpolation formula is given by
23
(1) (1)(2)
2! 3!
nn n n
uu uu u
yy uy y y
+++
=+∇+ ∇ + ∇
(1)
where
n
xx
u
n
−
=
.
Differentiating both sides of equation (1) with respect to x, we get
2
23
121362
2! 3!
nn n
dy
uuu
yy y
dx h
+++
=∇+ ∇ + ∇+
(2)
NUMERICAL DIFFERENTIATION AND INTEGRATION
297
At
,0
n
xxu
==
. Therefore putting u = 0 in (2), we get
23
111
23
n
nnn
xx
dy
yyy
dx h
=
= ∇ +∇ +∇ +
(3)
Again differentiating both sides of equation (2) w.r.t. x, we get
2
2
23 4
22
166123622
624
nn n
dy
uuu
yy y
dx h
+++
=∇+ ∇+ ∇+
At
,
0
n
xxu
==
. Therefore putting u = 0 in (3), we get
2
23 4
22
111
12
n
nn n
xx
dy
yy y
dx h
=
=∇+∇+∇+
(4)
Similarly,
3
34
33
13
2
n
nn
xx
dy
yy
dx h
=
=∇+∇+
and so on. (5)
Aliter: We know that
1
1
hD
Ee
−−
−∇= =
∴ −= −∇log (1 )hD
2345
2345
∇∇∇∇
=−∇+++++
or
2345
1
2345
D
h
∇∇∇∇
=∇+ + + + +
and
2234
2
1111
212
D
h
=∇+∇+∇
and
334
3
13
2
D
h
=∇+∇+
Applying these identities to
n
y
, we get
234
1111
234
n
nnnn
xx
dy
yyyy
dx h
=
=∇+∇ +∇ +∇
and
=
=∇+∇+∇+
2
23 4
22
111
12
n
nn n
xx
dy
yy y
dx h
and
3
34
33
13
2
n
nn
xx
dy
yy
dx h
=
=∇+∇+
298
COMPUTER BASED NUMERICAL AND STATISTICAL TECHNIQUES
6.2.3 Derivatives Using Stirling’s Formula
If we want to determine the values of the derivatives of the function near the middle of the
given set of arguments. We may apply any central difference formula. Therefore using Stirling’s
formula, we get.
33
22 22
24
01 1 2
01 2
(1) (1)
22! 3! 2 4!
n
yy y y
uuu uu
yyu y y
−−−
−−
∆+∆ ∆ +∆
−−
=+ +∆ + + ∆ +
(1)
where
0
xx
u
h
−
=
.
Now, differentiating w.r.t. x, we get
33
23
24
01 1 2
12
(3 1) (4 2 )
23!24!
dy y y y y
uuudu
uy y
dx dx
−−−
−−
∆+∆ ∆ +∆
−−
=+∆+ +∆+
Since
0
xx
u
h
−
=
∴
1du
dx h
=
∴
33
23
24
01 1 2
12
13142
23!24!
dy y y y y
uuu
uy y
dx h
−−−
−−
∆+∆ ∆ +∆
−−
=+∆+ +∆+
(2)
At
0,
0,
xxu==
therefore, putting u = 0 in (2), we get
1
0
33
0
12
11
26 2
xx
yy
dy y y
dx h
−
−−
−
∆+∆
∆+∆
=− +
Again differentiating, we get
−−
−−
∆+∆
−
=∆+ + ∆+
233
2
24
12
12
22
16 122
62 4!
dy y y
uu
yy
dx h
(3)
At
0
,0
xxu==
therefore, putting
0u =
in (3), we get
0
2
24
12
22
11
12
xx
dy
yy
dx h
−−
=
=∆−∆+
and so on.
6.2.4 Derivative Using Newton’s Divided Difference Formula
Newton’s divided difference formula for finding the successive differentiation at the given
value of x. Let us consider a function f(x) of degree n, then
23
0) 00 01 0 012 0
() ( ( ) ( )( )( ) ( )( )( )( ) ( )
yfxfxxxfxxxxx fxxxxxxx fx==+−∆+−−∆ +−−−∆
01 1 0
( )( ) ( ) ( )
n
n
xx xx xx fx
−
++− − − ∆
NUMERICAL DIFFERENTIATION AND INTEGRATION
299
Differentiate this equation w.r.t. ‘x’ as many times as we require and put
,i
xx
=
we get the
required derivatives.
Example 1. Find
dy
dx
at x = 0.1 from the following table:
x 0.1 0.2 0.3 0.4
y 0.9975 0.9900 0.9776 0.9604
Sol. Difference table:
xy
∆y
∆
2
y ∆
3
y
0.1 0.9975
–0.0075
0.2 0.9900 -0.0049
–0.0124 0.0001
0.3 0.9776 -0.0048
–0.0172
0.4 0.9604
Here,
0
0.1, 0.1
xh==
and
0
y =
0.9975 we know that, Newton’s forward difference formula.
=
= ∆ −∆ +∆
23
000
0.1
111
23
x
dy
yyy
dx h
()()
111
0.0075 0.0049 0.0001
0.1 2 3
=− −− +
=−0.050167.
Ans.
Example 2. Using following table.
x 1.0 1.1 1.2 1.3 1.4 1.5 1.6
y 7.989 8.403 8.781 9.129 9.451 9.750 10.031
Find
dy
dx
and
2
2
dy
dx
at x = 1.1.
Sol. Since the values are at equidistant and we want to find the value of y at x = 1.1.
Therefore, we apply Newton’s forward difference formula.
300
COMPUTER BASED NUMERICAL AND STATISTICAL TECHNIQUES
Difference table:
xy
∆
y
2
∆
y
∆
3
y
4
∆
y
5
∆
y
6
y∆
1.0 7.989
0.414
1.1 8.403 –0.036
0.378 0.006
1.2 8.781 –0.030 –0.002
0.348 0.004 0.001
1.3 9.129 –0.026 –0.001 –0.002
0.322 0.003 –0.001
1.4 9.451 –0.023 –0.002
0.299 0.005
1.5 9.750 –0.018
0.281
1.6 10.031
We have,
=
= ∆ −∆ +∆ −∆ +∆ −∆
0
23456
000000
111111
23456
xx
dy
yyyyyy
dx h
Putting
2
00 0
1.1, 0.378, 0.030,
xy y=∆= ∆=
and so on and h = 0.1, we get
()()()()
1.1
11 11 1
0.378 0.030 0.004 0.001 0.001
0.1 2 3 4 5
dy
dx
=−−+−−+−
[]
10 0.378 0.015 0.0013 0.00025 0.0002
=+++−
[]
10 0.39435 3.9435
==
and
=∆−∆+∆−∆+∆
0
2
23 4 5 6
00 0 0 0
22
1 11 5 137
12 6 180
x
dy
yy y y y
dx h
⇒
=−−−×+×
2
22
1.1
1115
0.030 0.004 0.001 0.001
12 6
(0.1)
dy
dx
[]
()
=− − − + =−
100 0.030 0.004 0.0009 0.0008 100 0.0341
=−0.341
.
Ans.Ans.
Ans.Ans.
Ans.
Example 3. Using the given table, find dy/dx at x = 1.2
x 1.0 1.2 1.4 1.6 1.8 2.0 2.2
y 2.7183 3.3201 4.0552 4.9530 6.0496 7.3891 9.0250
NUMERICAL DIFFERENTIATION AND INTEGRATION
301
Sol.
xy
∆
y
2
∆
y
3
y∆
4
y∆
5
y∆
6
y∆
1.0 2.7183
0.6018
1.2 3.3201 0.1333
0.7351 0.0294
1.4 4.0552 0.1627 0.0067
0.8978 0.0361 0.0013
1.6 4.9530 0.1988 0.0080 0.0001
1.0966 0.0441 0.0014
1.8 6.0496 0.2429 0.0094
1.3395 0.0535
2.0 7.3891 0.2964
1.6359
2.2 9.0250
We have
=
= ∆ −∆ +∆ −∆ +∆ −∆
0
23456
000 000
111111
23456
xx
dy
yyyyyy
dx h
Here,
2
00 0
1.2, 0.7351, 0.1627,
xy y=∆= ∆=
and so on and
0.2,h =
we get
()()()()
1.2
11111
0.7351 0.1627 0.0361 0.0080 0.0014
0.2 2 3 4 5
dy
dx
=−+−+
[]
5 0.7351 0.08135 0.0120 0.002 0.00028
=−+−+
3.32015=
. Ans.
Example 4. Find
dy
dx
and
2
2
dy
dx
of
1/3
yx=
at x = 50 from the following table:
x 50 51 52 53 54 55 56
1/3
yx=
3.6840 3.7084 3.7325 3.7563 3.7798 3.8030 3.8259
302
COMPUTER BASED NUMERICAL AND STATISTICAL TECHNIQUES
Sol.
x
1/3
yx=
∆
y
2
∆
y
3
y∆
50 3.6840
0.0244
51 3.7084 –0.0003
0.0241 0
52 3.7325 –0.0003
0.0238 0
53 3.7563 –0.0003
0.0235 0
54 3.7798 –0.0003
0.0232 0
55 3.8030 –0.0003
0.0229
56 3.8259
Here,
0
50, 1.
xh==
Then, we have Newton’s forward difference formula.
0
23
000
111
23
xx
dy
yyy
dx h
=
= ∆ −∆ +∆ −
()()
50
11 1
0.0244 0.0003 0
12 3
dy
dx
=−−+
()
=+ =
0.0244 0.00015 0.02455
and
()
0
2
23
00
22
1
xx
dy
yy
dx h
=
=∆−∆+
[]
2
1
( 0.0003)
(1)
=−
=
2
2
50
0.0003
dy
dx
=−
. Ans.
Example 5. The table given below reveals the velocity v of a body during the time t. 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
NUMERICAL DIFFERENTIATION AND INTEGRATION
303
Sol.
DifDif
DifDif
Dif
ferfer
ferfer
fer
ence table:ence table:
ence table:ence table:
ence table:
tv
∆
2
∆
3
∆
4
∆
1.0 43.1
4.6
1.1 47.7 –0.2
4.4 0.1
1.2 52.1 –0.1 0.1
4.3 0.2
1.3 56.4 –0.1
4.4
1.4 60.8
We have,
00
1.1, 4.77
tv==
and
0.1h =
Then the acceleration at
1.1t =
is given by
0
23
000
111
23
tt
dv
vvv
dt h
=
=∆−∆+∆
()()
11 1
4.4 0.1 0.2
0.1 2 3
=−−+
0.2
14.40.5
3
=− + +
45.167=
(approx.)Ans.
Example 6. Find f′(1.1) and f″(1.1) from the following table :
x 1.0 1.2 1.4 1.6 1.8 2.0
()
fx
0 0.1280 0.5440 1.2960 2.4320 4.0000
Sol. Difference table
x
()
fx
()
∆
fx
()
∆
2
fx
()
∆
3
fx
()
∆
4
fx
1.0 0
0.1280
1.2 0.1280 0.288
0.4160 0.048
1.4 0.5440 0.336 0
0.7520 0.048
1.6 1.2960 0.384 0
1.1360 0.048
1.8 2.4320 0.432
1.5680
2.0 4.0000
304
COMPUTER BASED NUMERICAL AND STATISTICAL TECHNIQUES
Here we have to find the derivatives at x=1.1 which lies between given arguments 1.0 and 1.2.
So apply Newton’s forward formula, we have
0
1
5( 1)
0.2
xx
x
ux
h
−
−
===−
(1)
() ()
()
()()
()
23
00 0
0
12
4(4 1)
( )
21 3!
uu u
fx fx ufx fx fx
−−
−
=+∆+ ∆+ ∆
(2)
Differentiating w.r.t. x, we get
()
()
()
() ()
2
23
00 0
21
362
2! 3!
u
uu du
f x fx fx fx
dx
−
−+
′
=∆ + ∆ + ∆
Also, from (1)
5
du
dx
=
∴
()
()
()
() ()
2
23
00 0
21
362
5
26
u
uu
f x fx fx fx
−
−+
′
=∆ + ∆ + ∆
At x =1.1, u = 5(1.1 – 1) = 0.5
∴
()
()
()
() ()
()
2
20.5 1 30.5 60.5 2
1.1 5 0.128 0.288 0.048
26
f
−−+
′
=+ +
[]
5 0.128 0 0.002
=+−
()
1.1 0.63.f
′
=
Ans.
Differentiating equation (2) again w.r.t. ‘x’, we get
()
() ()
23
00
66
5
6
udu
f x fx fx
dx
−
′′
=∆ + ∆
∴
() ( )
[]
5
1.1 25 0.288 0.5 1 0.0481 25 0.288 0.024
f
′′
=+−×=−
Hence,
()
1.1 6.6.f
′′
=
Ans.
Example 7. Find f′(1.5) from the following table:
x 0.0 0.5 1.0 1.5 2.0
f(x) 0.3989 0.3521 0.2420 0.1245 0.0540
Sol. Here we want to find the derivatives of f (x) at x = 1.5, which is near the end of the
arguments. Therefore, apply Newton’s backward formula.
NUMERICAL DIFFERENTIATION AND INTEGRATION
305
Difference Table
x
()
fx
()
fx∇
()
2
fx∇
()
3
fx∇
()
4
fx∇
0.0 0.3989
–0.0468
0.5 0.3521 –0.0633
–0.1101 0.0609
1.0 0.2420 –0.0024 –0.0215
–0.1125 0.0394
1.5 0.1295 0.037
0.0755
2.0 0.0540
Here, x
n
= 1.5, h = 0.5
Therefore,
234
1111
234
n
nnnn
xx
dy
yyyy
dx h
=
= ∇ +∇ +∇ +∇ +
() ()()
111
1.5 0.1125 0.0024 0.0609
0.5 2 4
f
′
=− +− +
[][]
2 0.1125 0.0012 0.0152251 2 0.098475
=− − + =−
⇒
()
1.5 0.19695.f
′
=−
Ans.
Example 8. From the following table, find the values of
dy
dx
and
2
2
dy
dx
at x = 2.03.
x 1.96 1.98 2.00 2.02 2.04
y 0.7825 0.7739 0.7651 0.7563 0.7473
Sol. Difference table
x
y
y∇
2
y∇
3
y∇
4
y∇
1.96 0.7825
–0.0086
1.98 0.7739 –0.0002
–0.0088 0.0002
2.00 0.7651 0 –0.0004
–0.0088 –0.0002
2.02 07563 –0.0002
–0.0090
2.04 0.7473