You are on page 1of 24

S ANJAY G HODAWAT U NIVERSITY

K OLHAPUR
S.Y. B. T ECH .
AIML

C OURSE C ODE : AMT1301


UNIT 2: N UMERICAL D IFFERENTIATION

Mathematics for Modern Computing

Prepared by

Mr. S.S. Salgare


Assistant Professor
Sanjay Ghodawat University, Kolhapur

September 12, 2022


Mr. S.S. Salgare

Contents
1 Newton’s Interpolation Formula 3
1.1 Newtons forward Interpolation Formula . . . . . . . . . . . . 3
1.2 Newtons Backward Interpolation Formula . . . . . . . . . . 4

2 Central Difference Formula 14


2.1 Stirling’s Formula: . . . . . . . . . . . . . . . . . . . . . . . . 14

3 Divided Difference Formula 18


3.1 Newton’s Divided Difference Formula . . . . . . . . . . . . . 18

4 Assignment No. 2 21

CONTENTS 1
Mr. S.S. Salgare

Introduction: Numerical differentiation is the process of calculating the


derivative of a function at some particular value of the independent vari-
able by means of a set of given values of the function. Consider the func-
tion y = f ( x ) which is tabulated for the values xn = x0 + nh where (n =
0, 1, 2, . . . )

Forward Differences: Suppose we are given following values of y = f ( x )


for a set of values of x
x x1 = x0 + h x2 = x0 + 2h x3 = x0 + 3h ... xn = x0 + nh
y y1 y2 y3 ... yn

The differences y1 − y0 , y2 − y1 , . . . , yn − y(n−1) when denoted by 4y0 , 4y1 , . . . ,


4 y(n−1) respectively are called the first order forward differences where 4
is the forward difference operator. Thus in general first order forward dif-
ference is given by
4 y r = y r +1 − y r
Similarly
42 y r = 4 y r +1 − 4 y r
43 y r = 42 y r +1 − 42 y r
and so on. These differences can be written in tabular form as:

Backward Differences: The differences y1 − y0 , y2 − y1 , . . . , yn − yn−1 when


denoted by 5y1 , 5y2 , . . . , 5yn respectively are called the first order back-
ward differences where 5 is the Backward difference operator. Thus in
general first order forward difference is given by

5 y r = y r − y r −1

CONTENTS 2
Mr. S.S. Salgare

Similarly
52 y r = 5 y r − 5 y r −1
53 y r = 52 y r − 52 y r −1
and so on. These differences can be written in tabular form as:

1 Newton’s Interpolation Formula


Interpolation is the technique of estimating the value of a function for any
intermediate value of the independent variable, while the process of com-
puting the value of the function outside the given range is called extrapo-
lation.

1.1 Newtons forward Interpolation Formula


Consider the set of (n + 1) values viz. ( x0 , y0 ), ( x1 , y1 ), . . . , ( xn , yn ) of x
and y, where values of x are equally spaced i.e. the difference between
two successive values of x is constant, say h. Then the newton’s forward
difference formula is given by
u ( u − 1) 2 u(u − 1)(u − 2) 3
y = y0 + u 4 y0 + 4 y0 + 4 y0 + . . .
2! 3!
Where x = x0 + uh
du du 1
Differentiate w.r.t x, we get 1 = h or =
dx dx h
By chain rule
dy du du
=
dx du dx
1 dy
=
h du

1 NEWTON’S INTERPOLATION FORMULA 3


Mr. S.S. Salgare

2u − 1 2 3u2 − 6u + 2 3 4u3 − 18u2 + 22u − 6 4


 
dy 1
= 4 y0 + 4 y0 + 4 y0 + 4 y0 + . . .
dx h 2! 3! 4!
dy d2 y d3 y
Thus to find , and for non tabular values of x which is at the
dx dx2 dx3
beginning or near the beginning we use
2u − 1 2 3u2 − 6u + 2 3 2u3 − 9u2 + 11u − 3 4
 
dy 1
= 4 y0 + 4 y0 + 4 y0 + 4 y0 + · · ·
dx h 2 6 12
d2 y 6u2 − 18u + 11 4 2u3 − 12u2 + 21u − 10 4
 
1 2 3
= 2 4 y0 + ( u − 1) 4 y0 + 4 y0 + 4 y0 + · · ·
dx2 h 12 12
d3 y 2u − 3 4 2u2 − 8u + 7 5
 
1 3
= 3 4 y0 + 4 y0 + 4 y0 + · · ·
dx3 h 2 4
where x = x0 + uh

dy d2 y d3 y
Next to find , and for tabular value of x = x0 which is at the
dx dx2 dx3
beginning or near the beginning we use
   
dy 1 1 2 1 3 1 4
= 4 y0 − 4 y0 + 4 y0 − 4 y0 + · · ·
dx x= x0 h 2 3 4
 2   
d y 1 2 3 11 4 5 5 137 6
= 2 4 y0 − 4 y0 + 4 y0 − 4 y0 + 4 y0 − · · ·
dx2 x= x0 h 12 6 180
 3   
d y 1 3 3 4 7 5
= 3 4 y0 − 40 + 4 y0 + · · ·
dx3 x= x0 h 2 4

1.2 Newtons Backward Interpolation Formula


dy d2 y d3 y
To find , and for non tabular values of x which is at the end or
dx dx2 dx3
near the end of the table we use
3u2 + 6u + 2 3 2u3 + 9u2 + 11u + 3 4
 
dy 1 2u + 1 2
= 5yn + 5 yn + 5 yn + 5 yn + . . .
dx h 2 6 12
d2 y 6u2 + 18u + 11 4 2u3 + 12u2 + 21u + 10 5
 
1 2 3
= 2 5 y n + ( u + 1) 5 y n + 5 yn + 5 yn + . . .
dx2 h 12 12
d3 y 2u2 + 8u + 7 5
 
1 3 2u + 3 4
= 3 5 yn + 5 yn + 5 yn + . . .
dx3 h 2 4
where x = xn + uh

1 NEWTON’S INTERPOLATION FORMULA 4


Mr. S.S. Salgare

dy d2 y d3 y
Next to find , and for tabular value of x = xn which is at the
dx dx2 dx3
end or near the end of the table we use
   
dy 1 1 2 1 3 1 4
= 5yn + 5 yn + 5 yn + 5 yn + · · ·
dx x= xn h 2 3 4
 2   
d y 1 2 3 11 4 5 5 137 6
= 2 5 yn + 5 yn + 5 yn + 5 yn + 4 yn + · · ·
dx2 x= xn h 12 6 180
 3   
d y 1 3 3 4 7 5
= 3 5 yn + 5 yn + 5 yn + · · ·
dx3 x= xn h 2 4

Example 1 Find the first and second order derivatives of the function tabulated
below
x 0.01 0.02 0.03 0.04 0.05 0.06
f(x) 0.1023 0.1047 0.1071 0.1096 0.1122 0.1148

Ans: We first prepare the difference table as

Here we have to find derivatives at tabular value x0 = 0.01. By Newton’s


forward interpolation formula
 
dy 1 1 2 1 3 1 4
= 4 y0 − 4 y0 + 4 y0 − 4 y0 + · · ·
dx h 2 3 4
2
 
d y 1 2 3 11 4 5 5
= 4 y0 − 4 y0 + 4 y0 − 4 y0 · · ·
dx2 h2 12 6
Here 4y0 = 0.0024; 42 y0 = 0.0000; 43 y0 = 0.0001; 44 y0 = −0.0001
   
dy 1 1 1
= 0.0024 + × 0.0001 − (−0.0001) = 0.245833
dx x=0.01 0.01 3 4
 2   
d y 1 11
x = 0.01 = −0.0001 + (−0.0001) = −1.9166
dx2 (0.01)2 12

1 NEWTON’S INTERPOLATION FORMULA 5


Mr. S.S. Salgare

dy d2 y
= 0.2458; = −1.9166
dx dx2
   2 
dy d y
Example 2 Evaluate and with the following table
dx 0.1 dx2 0.1

x 0.0 0.1 0.2 0.3 0.4


y 1.0000 0.9975 0.9900 0.9776 0.9604

Ans: First we prepare the difference table

Here we have to find derivatives at tabular value x = x0 = 0.1. By New-


ton’s forward interpolation formula
 
dy 1 1 2 1 3 1 4
= 4 y0 − 4 y0 + 4 y0 − 4 y0 + · · ·
dx h 2 3 4
2
 
d y 1 2 3 11 4 5 5
= 4 y0 − 4 y0 + 4 y0 − 4 y0 + · · ·
dx2 h2 12 6

Thus
   
dy 1 1 1
= −0.0075 − (−0.0049) + (0.0001)
dx x =0.1 h 2 3
= −0.050166
d2 y
 
1
= [−0.0049 − 0.0001]
dx2 x =0.1 h2
= −0.5
dy d2 y
= −0.050166; = −0.5
dx dx2

1 NEWTON’S INTERPOLATION FORMULA 6


Mr. S.S. Salgare

dy d2 y
Example 3 From the following table of values of x and y, obtain and for
dx dx2
x=1.0 & 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

Ans: First we prepare the difference table

x y = f (x) 4 42 43 44 45 46
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

Here h = 0.2 and we have to find derivatives at tabular value at the begin-
ning of the table. By Newton’s forward interpolation formula
   
dy 1 1 2 1 3 1 4
= 4 y0 − 4 y0 + 4 y0 − 4 y0 + · · ·
dx x= x0 h 2 3 4
 2   
d y 1 2 3 11 4 5 5
= 4 y0 − 4 y0 + 4 y0 − 4 y0 + · · ·
dx2 x= x0 h2 12 6

Case 1: x = x0 = 1.0
 
dy 1 1 1 1 5
= 0.6018 − 0.1333 + 0.0294 − 0.0067 − 0.0013
dx 0.2 2 3 4 6
= 2.7175  or 2.7175
d2 y

1 11 5
= 0.1333 − 0.0294 + 0.0067 − 0.0013
dx2 (0.2)2 12 6
= 2.725958

1 NEWTON’S INTERPOLATION FORMULA 7


Mr. S.S. Salgare

Case 2: x = x0 = 1.2
 
dy 1 1 1 1 1
= 0.7351 − 0.1627 + 0.0361 − 0.0080 + 0.0014
dx 0.2 2 3 4 5
= 3.3203 or 3.3205
d2 y
 
1 11 5
= 0.1627 − 0.0361 + 0.008 − 0.0014
dx2 (0.2)2 12 6
= 3.3192

Example 4 Find first and second derivative at x=1.77 from the following data

x 1.76 1.78 1.80 1.82 1.84 1.86


y 0.09822 0.9782 0.9738 0.9691 0.9604 0.9585

Ans: First we prepare the difference table

x y = f (x) 4 42 43 44 45
1.76 0.9822
-0.0040
1.78 0.9782 -0.0004
-0.0044 0.0001
1.80 0.9738 -0.0003 -0.0038
-0.0047 -0.0037 0.0183
1.82 0.9691 -0.0040 0.0145
-0.0087 0.0108
1.84 0.9604 0.0068
-0.0019
1.86 0.9585

Here h = 0.02 and we have to find derivatives at non tabular value. Let
x = x0 = 1.76. By Newton’s forward interpolation formula

2u − 1 2 3u2 − 6u + 2 3 2u3 − 9u2 + 11u − 3 4


 
dy 1
= 4 y0 + 4 y0 + 4 y0 + 4 y0 + · · ·
dx h 2 6 12
d2 y 6u2 − 18u + 11 4 2u3 − 12u2 + 21u − 10 4
 
1 2 3
= 4 y0 + ( u − 1) 4 y0 + 4 y0 + 4 y0 + · · ·
dx2 h2 12 12

x − x0 1.77 − 1.76 0.01 1


where u = = = = ⇒ u = 0.5
h 0.02 0.02 2
dy 1 2(0.5) − 1 3(0.5)2 − 6(0.5) + 2
= [−0.001 + (−0.0004) + 0.0001
dx 0.02 2 6
2(0.5)3 − 9(0.5)2 + 11(0.5) − 3
+ (0.0038) + · · ·
12
= 0.2081

1 NEWTON’S INTERPOLATION FORMULA 8


Mr. S.S. Salgare

d2 y 1 6 × 0.52 − 18 × 0.5 + 11
= [− 0.0004 + ( 0.5 − 1 ) 0.0001 + (−0.0038)
dx2 0.22 12
2 × 0.53 − 12 × 0.52 + 21 × 0.5 − 10
+ 0.0183]
12
=-12.4739
dy d2 y
= −0.2081; = −12.4739
dx dx2
Example 5 Find first and second derivative at x=3 from the following data
x 0 10 20 30 40
y 19.96 39.65 58.81 77.21 94.61

Ans: First we prepare the difference table


x y = f (x) 4 42 43 44
0 19.96
19.69
10 39.65 -0.53
19.16 -0.23
20 58.81 -0.76 -0.01
18.40 -0.24
30 77.21 -1
17.40
40 94.61
Here h = 10 and we have to find derivatives at non tabular value. Let
x = x0 = 0. By Newton’s forward interpolation formula
2u − 1 2 3u2 − 6u + 2 3 2u3 − 9u2 + 11u − 3 4
 
dy 1
= 4 y0 + 4 y0 + 4 y0 + 4 y0 + · · ·
dx h 2 6 12
2 2
6u − 18u + 11 4 2u − 12u2 + 21u − 10 5
3
 
d y 1 2 3
= 4 y0 + ( u − 1) 4 y0 + 4 y0 + 4 y0 + · · ·
dx2 h2 12 12
x − x0 3
where u = = ⇒ u = 0.3
h 10
dy 1 2(0.3) − 1 3(0.3)2 − 6(0.3) + 2
= [19.69 + (−0.53) + (−0.23)
dx 10 2 6
2(0.3)3 − 9(0.3)2 + 11(0.3) − 3
+ (−0.01) + · · · ]
12
= 1.9783

d2 y 6 × 0.32 − 18 × 0.3 + 11
 
1
= − 0.53 + ( 0.3 − 1 )(− 0.23 ) + (− 0.01 )
dx2 102 12
=-0.003741

1 NEWTON’S INTERPOLATION FORMULA 9


Mr. S.S. Salgare

dy d2 y
= 1.97783; = −0.003741
dx dx2

Example 6 Find first and second derivative at x=1.1 from the following data
x 1.0 1.2 1.4 1.6 1.8 2
y 0.000 0.128 0.544 1.296 2.432 4.000

Ans: First we prepare the difference table

x y = f (x) 4 42 43 44
1.0 0.000
0.128
1.2 0.128 0.288
0.416 0.048
1.4 0.544 0.336 0.000
0.752 0.048
1.6 1.296 0.384 0.000
1.136 0.048
1.8 2.432 0.432
0.1568
2.0 4.000

dy d2 y
= 0.630; = 6.6at x = 1.1
dx dx2

Example 7 From the following table calculate the angular velocity and accelera-
tion at t=1.0
Time t 0.0 0.2 0.4 0.6 0.8 1.0
Angle θ 0.00 0.12 0.48 1.10 2.00 3.20

Ans: First we prepare the difference table

t θ 5 52 53 54
0.0 0.00
0.12
0.2 0.12 0.24
0.36 0.02
0.4 0.48 0.26 0.00
0.62 0.02
0.6 1.10 0.284 0.00
0.9 0.02
0.8 2.00 0.30
1.2
1.0 3.20

1 NEWTON’S INTERPOLATION FORMULA 10


Mr. S.S. Salgare

Here we have to find derivative at tabular value x = xn = 1.0 and h = 0.2.


By Newtons backward interpolation formula
   
dy 1 1 2 1 3 1 4
= 5θn + 5 θn + 5 θn + 5 θn + . . .
dx x= xn h 2 3 4
 2   
d y 1 2 3 4 11 4 5 5
= 5 θn + 4 θn + 5 θn + 5 θn + 5 θn + . . .
dx2 x= xn h2 12 6
Thus
 
dy 1 1 1
= 1.2 + × 0.3 + × 0.02
dx 0.2 2 3
= 6.7833
d2 y 1
= [0.3 + 0.02]
dx2 (0.2)2
= 8

Example 8 From the following table find the first two derivative at x=1.6
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

Ans: First we prepare the difference table


x y = f (x) 5 52 53 54 55 56
1.0 7.898
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.003
1.4 9.451 -0.023 0.002
0.299 0.005
1.5 9.750 -0.018
0.281
1.6 10.031
Here h = 0.1 and we have to find derivatives at tabular value x = xn = 1.6.
By Newton’s backward interpolation formula
 
dy 1 1 1 1
= 5 y n + 52 y n + 53 y n + 54 y n + · · ·
dx h 2 3 4
2
 
d y 1 2 3 11 4 5 5
= 5 yn + 5 yn + 5 yn + 5 yn + · · ·
dx2 h2 12 6

1 NEWTON’S INTERPOLATION FORMULA 11


Mr. S.S. Salgare

Thus
 
dy 1 1 1 1 1 1
= 0.281 + (−0.018) + (0.005) + (0.002) + (0.003) + (0.002)
dx 0.1 2 3 4 5 6
= 2.751
d2 y
 
1 11 5
= −0.018 + 0.005 + (0.002) + (0.003)
dx2 (0.1)2 12 6
= −0.7144
dy d2 y
= 2.751; = −0.7144
dx dx2
Example 9 Find the first, second derivative at x=2.9 from the following table
x 2.0 2.2 2.4 2.6 2.8 3.0
y -23.000 -21.952 -20.376 -18.224 -15.448 -12.000

Ans: First we prepare the difference table


x y 5 52 53 54
2.0 -23.000
1.048
2.2 -21.952 0.528
1.576 0.048
2.4 -20.376 0.576 0.000
2.152 0.048
2.6 -18.224 0.624 0.000
2.776 0.048
2.8 -15.448 0.672
3.448
3.0 -12.000
Here h = 0.2 and we have to find derivatives at non tabular- value x =
xn = 2.9. By Newton’s backward interpolation formula

3u2 + 6u + 2 3 2u3 + 9u2 + 11u + 3 4


 
dy 1 2u + 1 2
= 5yn + 5 y0 + 5 yn + 5 yn + · · ·
dx h 2 6 12
2 2
 
d y 1 6u + 18u + 11 4
2
= 2
52 y0 + ( u + 1) 53 y n + 5 yn + · · ·
dx h 12
x − xn 2.9 − 3
where u = = ⇒ u = −0.5
h 0.2
3(−0.5)2 + 6(−0.5) + 2
 
dy 1 2(−0.5) + 1
= 3.448 + (0.672) + (0.048)
dx 0.2 2 6
= 17.23

1 NEWTON’S INTERPOLATION FORMULA 12


Mr. S.S. Salgare

d2 y 1
2
= [0.672 + (−0.5 + 1)(0.048)]
dx 0.22
=17.40
dy d2 y
= 17.2; = 17.40
dx dx2
Example 10 Find the first, second derivative at x=4.5 from the following table
x 0 1 2 3 4 5
y 1.12 3.45 6.67 10.80 16.12 24.52

Ans: First we prepare the difference table


x y 5 52 53 54 55
0 1.12
2.33
1 3.45 0.89
3.22 0.02
2 6.67 0.91 0.26
4.13 0.28 1.35
3 10.80 1.19 1.61
5.32 1.89
4 16.12 3.08
8.40
5 24.52
Here h = 1 and we have to find derivatives at non tabular- value x = xn =
4.5. By Newton’s backward interpolation formula
3u2 + 6u + 2 3 2u3 + 9u2 + 11u + 3 4
 
dy 1 2u + 1 2
= 5yn + 5 y0 + 5 yn + 5 yn + · · ·
dx h 2 6 12
d2 y 6u2 + 18u + 11 4
 
1 2 3
= 5 y0 + ( u + 1) 5 y n + 5 yn + · · ·
dx2 h2 12
x − xn 4.5 − 5
where u = = ⇒ u = −0.5
h 1
dy 1 2(−0.5) + 1 3(−0.5)2 + 6(−0.5) + 2
= [8.40 + (3.08) + (1.89)
dx 1 2 6
2(−0.5)3 + 9(−0.5)2 + 11(−0.5) + 3
+ 1.61 + · · · ]
12
= 8.2542

d2 y
= 4.7477
dx2
dy d2 y
= 8.2542; = 4.7477
dx dx2

1 NEWTON’S INTERPOLATION FORMULA 13


Mr. S.S. Salgare

2 Central Difference Formula


By using Newtons forward or backward difference formula we can find
the derivative of a function at the two ends of the table or near the two
ends. Now for finding the derivatives at the center of the table or bear to
the center then we use central difference formula.
Here first we shift the origin and if necessary scale of the indepen-
dent variable also. So that the given values of x0 , x1 , x2 , x3 , . . . becomes
. . . , u−3 , u−2 , u−1 , u0 , u1 , u2 , u3 , . . . . Then we use the formula involving these
values and the differences. These differences are called central differences
and the formula based on these differences are called central difference for-
mule.
The table of differences for central values is given by:

u x y = f (x) 4 42 43 44 45 46
u −3 x0 y −3
4 y −3
u −2 x1 y −2 42 y −3
4 y −2 43 y −3
u −1 x2 y −1 42 y −2 44 y −3
4 y −1 43 y −2 45 y −3
u0 x3 y0 42 y −1 44 y −2 46 y −3
4 y0 43 y −1 45 y −2
u1 x4 y1 42 y 0 44 y −1
4 y1 43 y0
u2 x5 y2 42 y1
42 y 2
u3 x6 y3

2.1 Stirling’s Formula:


Stirling’s formula can be obtained from Gauss formula. We accept it with-
out proof

4 y −1 + 4 y 0 u 2 2 u ( u 2 − 1 ) 43 y −1 + 43 y 0 u 2 ( u 2 − 1 ) 4
y = y0 + + 4 y −1 + + 4 y −2 + · · ·
2 2 3! 2 4!
x − x0
where x = x0 + uh or u =
h
dy dy du
By chain rule = .
dx du dx
Hence
1 4 y −1 + 4 y 0 3u2 − 1 43 y−1 + 43 y−2 4u3 − 2u 4
 
dy
= + u 42 y −1 + + 4 y −2 + . . .
dx h 2 6 2 4!

2 CENTRAL DIFFERENCE FORMULA 14


Mr. S.S. Salgare

1 4 y −1 + 4 y 0 1 43 y −1 + 43 y −2 1 45 y −3 + 45 y −2
   
dy
= − + +···
dx x = x0 h 2 6 2 30 2
d2 y
   
1 2 1 4 1 6
= 4 y −1 − 4 y −2 + 4 y −3 + · · ·
dx2 x = x0 h2 12 90

Remark: Stirlings formula may be committed to memory as follows:

1) First mark the odd differences i.e. 1st , 3rd & 5th differences appearing just
above and below of the line y0

2) Then mark the even differences i.e.2nd , 4th & 6th differences appearing in
the row of y0

3) Then
   
dy 1 st 1 rd 1 th
= (mean of1 diff.) − (mean of3 diff.) + (mean of5 diff.)
dx x= x0 h 3 30
 2   
d y 1 1 1
= 2 (2nd diff.) − (4th diff.) + (6th diff.)
dx2 x= x0 h 12 90

dy d2 y
Example 11 From the following table find and at x=0.5
dx dx2
x 0.35 0.40 0.45 0.50 0.55 0.60 0.65
y 1.521 1.506 1.488 1.467 1.444 1.418 1.389

Ans: Here we have to calculate derivatives at the centre of the table, there-
fore we use Stirling’s formula

1 4 y −1 + 4 y 0 1 43 y −1 + 43 y −2 1 45 y −3 + 45 y −2
   
dy
= − +
dx x = x0 h 2 6 2 30 2
d2 y
   
1 1 1
= 42 y −1 − 44 y −2 + 46 y −3
dx2 x = x0 h2 12 90

Next to find the difference table

2 CENTRAL DIFFERENCE FORMULA 15


Mr. S.S. Salgare

u x y = f (x) 4 42 43 44 45 46
-3 0.35 1.521
-0.015
-2 0.40 1.506 -0.003
-0.018 0.000
-1 0.45 1.488 -0.003 0.001
-0.021 0.001 -0.003
0 0.50 1.467 -0.002 -0.002 0.006
-0.023 -0.001 0.003
1 0.55 1.444 -0.003 0.001
-0.026 0.000
2 0.60 1.418 -0.003
-0.029
3 0.65 1.389

Thus
−0.021 + −0.023 1
   
dy 1 1
= − ×0+ ×0 = −0.44
dx 0.05 2 6 30
 2 x=0.5
d y 1
2
= [−0.003] = −0.7067
dx x=0.5 0.052

dy d2 y
= −0.44; = −0.7067
dx dx2

dy d2 y
Example 12 From the following table find and at x=6
dx dx2
x 4.5 5.0 5.5 6.0 6.5 7.0 7.5
y 9.69 12.90 16.71 21.18 26.37 32.34 39.15

Ans: Here we have to calculate derivatives at x = 6 the center of the table,


therefore we use Stirling’s formula

1 4 y −1 + 4 y 0 1 43 y −1 + 43 y −2 1 45 y −3 + 45 y −2
   
dy
= − +
dx x = x0 h 2 6 2 30 2
d2 y
   
1 1 1
= 42 y −1 − 44 y −2 + 46 y −3
dx2 x = x0 h2 12 90

Next to find the difference table

2 CENTRAL DIFFERENCE FORMULA 16


Mr. S.S. Salgare

u x y = f (x) 4 42 43 44 45 46
-3 4.5 9.69
3.21
-2 5.0 12.90 0.6
3.81 0.06
-1 5.5 16.71 0.66 0.000
4.47 0.06
0 0.6 21.18 0.72 0.000
5.16 0.06
1 6.5 26.37 0.78 0.000
5.97 0.06
2 7.0 32.34 0.84
6.81
3 7.5 39.15

Thus
   
dy 1 4.47 + 5.19 1 0.06 + 0.06 1
= − × + ×0 = 9.64
dx 0.5 2 6 2 30
 2 x=0.5
d y 1
2
= [0.72] = 2.88
dx x=0.5 0.52

dy d2 y
= 9.64; = 2.88
dx dx2

dy d2 y
Example 13 From the following table find and at x=1.15
dx dx2
x 1.00 1.05 1.10 1.15 1.20 1.25 1.30
y 1.0000 1.0247 1.0488 1.0723 1.0954 1.1180 1.1401

Ans: Here 46 = 0.0009

dy d2 y
= 0.4658; = −0.146
dx dx2

dy d2 y
Example 14 From the following table find and at x=6
dx dx2
x 4.5 5.0 5.5 6.0 6.5 7.0 7.5
y 9.69 12.90 16.71 21.18 26.37 32.34 39.15

Ans: Here 43 = 0.06

dy d2 y
= 9.64; = 2.88
dx dx2

2 CENTRAL DIFFERENCE FORMULA 17


Mr. S.S. Salgare

3 Divided Difference Formula


When the values of x are not equally spaced then above formula cannot
be used. In this case we use Newton’s divided difference formula. Before
deriving this formula, we shall first define these differences.
If ( x0 , y0 ), ( x1 , y1 ), ( x2 , y2 ), . . . , ( xn , yn ) be given points, then 1st divided
difference for the argument x0 , x1 is defined by the relation
y1 − y0 y2 − y1 y3 − y2
[ x0 , x1 ] = ; [ x1 , x2 ] = ; [ x2 , x3 ] = and so on
x1 − x0 x2 − x1 x3 − x2
The second order divided difference for x0 , x1 , x2 defined as

[ x1 , x2 ] − [ x0 , x1 ] [ x2 , x3 ] − [ x1 , x2 ]
[ x0 , x1 , x2 ] = ; [ x1 , x2 , x3 ] = and so on
x2 − x1 x3 − x1
The third order differences for x0 , x1 , x2 , x3 defined as

[ x1 , x2 , x3 ] − [ x0 , x1 , x2 ]
[ x0 , x1 , x2 , x3 ] =
x3 − x0

3.1 Newton’s Divided Difference Formula


Let y0 , y1 , y2 , . . . , yn be the values of y = f ( x ) corresponding to the argu-
ment x0 , x1 , x2 , . . . , xn respectively. The the function y = f ( x ) is given by
f ( x ) = f ( x0 ) + ( x − x0 )[ x0 , x1 ] + ( x − x0 )( x − x1 )[ x0 , x1 , x2 ] +
( x − x0 )( x − x1 )( x − x2 )[ x0 , x1 , x2 , x3 ] + . . .

Note: Let the Newtons divided differences are denoted by 4, 42 , 43 and


so on then

y = y0 + ( x − x0 ) 4 y0 + ( x − x0 )( x − x1 ) 42 y0 + ( x − x0 )( x − x1 )( x − x2 ) 43 y0 + · · ·

Example 15 Determine f’(4) and f’(3) from the following table

x 1 2 4 8 10
f (x) 0 1 5 21 27

Solution: Note that here value of x are not equally spaced, we use New-
ton,s divided difference formula x

3 DIVIDED DIFFERENCE FORMULA 18


Mr. S.S. Salgare

x y 4 42 43 44
1 0
1
1
2 1
3
2 0
1 1
4 5 -
3 144
1
4 -
16
1
8 21 -
6
3
10 27

By Newtons divided difference formula

y = f ( x ) = y0 + ( x − x0 ) 4 y0 + ( x − x0 )( x − x1 ) 42 y0 + . . .
1 1
f ( x ) = ( x − 1) + ( x − 1)( x − 2) − ( x − 1)( x − 2)( x − 4)( x − 8)
3 14
Thus f 0 (4) = 2.8333 and f 0 (3) = 1.9792
Example 16 Calculate f’(9) from the following table

x 5 7 11 13 17
f (x) 150 392 1452 2366 5202

Solution: Note that here value of x are not equally spaced, we use New-
ton,s divided difference formula x
x y 4 42 43 44
5 150
121
7 392 24
265 1
11 1452 32 0
457 1
13 2366 42
709
17 5202

By Newtons divided difference formula

y = f ( x ) = y0 + ( x − x0 ) 4 y0 + ( x − x0 )( x − x1 ) 42 y0 + . . .
f ( x ) = 150 + 121( x − 5) + 24( x − 5)( x − 7) + ( x − 5)( x − 7)( x − 1)

Thus f 0 (9) = 261

3 DIVIDED DIFFERENCE FORMULA 19


Mr. S.S. Salgare

Example 17 find first and second derivative of the function tabulated below at
x=8
x 4 5 7 10 11 13
f (x) 48 100 294 900 1210 2028

Solution: Note that here value of x are not equally spaced, we use New-
ton,s divided difference formula x
x y 4 42 43 44
4 48
52
5 100 15
97 1
7 294 21 0
202 1
10 900 27 0
310 1
11 1210 33
49
13 2028 33

By Newtons divided difference formula

f ( x ) = y0 + ( x − x0 ) 4 y0 + ( x − x0 )( x − x1 ) 42 y0 + . . .

Thus f 0 (8) = 176 f 00 (8) = 46

———————————————————————————

3 DIVIDED DIFFERENCE FORMULA 20


Mr. S.S. Salgare

4 Assignment No. 2
dy
1) Find at x = 0.1 from the following table
dx

x 0.1 0.2 0.3 0.4


y 0.9975 0.9900 0.9776 0.9604

2) The table given below reveals 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

3) Find first and second order derivative at x = 3 from the following table

x 2.0 2.2 2.4 2.6 2.8 3


y -23.000 -21.952 -20.376 -18.224 -15.448 -12.000

4) Find first and second order derivative at x = 1.9and x = 1.1 from the
following table

x 1.0 1.2 1.4 1.6 1.8 2.0


y 0.5403 0.3624 0.1700 -0.00292 -0.2272 -0.4161

5) Find first and second order derivative at x = 1.2 from the following
table

x 1 1.3 1.6 1.9 2.2 2.5 2.8


y 1 2.6491 5.6176 10.6831 18.8176 31.1875 48.1536

6) Find first and second order derivative at x = 5.2 from the following
table

x 4.9 5.0 5.1 5.2 5.3 5.4 5.5


y 134.29 148.417 164.022 181.272 200.337 221.406 244.692

7) Find first and second order derivative at x = 1 from the following table

x -2 -1 0 1 2 3 4
y 104 17 0 -1 8 69 272

4 ASSIGNMENT NO. 2 21
Mr. S.S. Salgare

8) Find f 0 (10) from the following table

x 3 5 11 27 34
y -13 23 899 17315 35606

9) Find f 0 (4)and f 00 (4) from the following table

x 0 1 3 4 5 -1
y -1 1 65 211 529 1

10) Find f 0 (5)and f 00 (8) from the following table

x 0 2 3 4 7 9
y 4 26 58 112 466 922

4 ASSIGNMENT NO. 2 22
Mr. S.S. Salgare

Solution to Assignment No. 2


 
dy
1) 44 = 0.0001 = −0.050167
dx x =0.1

2) 44 = 0.1; Acceleration = 45.1667


d2 y
   
3 dy
3) 5 = 0.048(constant); = 19 = 18
dx x=3 dx2 x =3

4) 55 = −0.0004
   2 
dy d y
At x = 1.9 = −0.9463 = 0.3222
dx x=1.9 dx2
   2  x=1.9
dy d y
At x = 1.1 = −0.8912 = −0.4536
dx x=1.1 dx2 x=1.1
   2 
dy d y
5) 56 = −1(constant); = 6.1137 = 12.1028
dx x=1.2 dx2 x=1.2

6) 56 = −0.011 and f 0 = 181.273 f 00 = 181.389

7) 44 = 48 f 0 (1) = 1, f 00 (1) = 6

8) 43 = 1 f 0 (10) = 233

9) 44 = 1 f 0 (4) = 217, f 00 (4) = 170

10) 43 = 1 f 0 (4) = 98, f 00 (4) = 52

*****************************

4 ASSIGNMENT NO. 2 23

You might also like