Professional Documents
Culture Documents
Block-2 MCSE-004 Unit-1
Block-2 MCSE-004 Unit-1
Block-2 MCSE-004 Unit-1
Differentiation
UNIT 1 NUMERICAL DIFFERENTIATION
Structure Page Nos.
1.0 Introduction 5
1.1 Objectives 5
1.2 Methods Based on Undetermined Coefficients 5
1.3 Methods Based on Finite Difference Operators 9
1.4 Methods Based on Interpolation 14
1.5 Summary 21
1.6 Solutions/Answers 21
1.0 INTRODUCTION
Differentiation of a function is a fundamental and important concept in calculus.
When the function, say f(x), is given explicitly, its derivatives f ′ (x), f ′′ (x),
f ′′′ (x),… etc. can be easily found using the methods of calculus. For example, if
f(x) =x2, we know that f ′ (x) = 2x, f ′′(x) = 2 and all the higher order derivatives are
zero. However, if the function is not known explicitly but, instead, we are given a
table of values of f(x) corresponding to a set of values of x, then we cannot find the
derivatives by using methods of calculus. For instance, if f (xk) represents distance
travelled by a car in time xk, k = 0, 1, 2, …seconds, and we require the velocity and
acceleration of the car at any time xk, then the derivatives f ′(x) and f ′′(x) representing
velocity and acceleration respectively, cannot be found analytically. Hence, the need
arises to develop methods of differentiation to obtain the derivative of a given
function f(x), using the data given in the form of a table, where the data might have
been formed as a result of scientific experiments.
Numerical methods have the advantage that they are easily adaptable on calculators
and computers. These methods make use of the interpolating polynomials, which we
discussed in earlier block. We shall now discuss, in this unit, a few numerical
differentiation methods, namely, the method based on undetermined coefficients,
methods based on finite difference operators and methods based on interpolation.
1.1 OBJECTIVES
After going through this unit you should be able to:
• explain the importance of the numerical methods over the methods of calculus;
• use the method of undetermined coefficients and methods based on finite
difference operators to derive differentiation formulas and obtain the derivative
of a function at step points, and
• use the methods derived from the interpolation formulas to obtain the
derivative of a function at off step points.
Any pre-assigned finite number of digits will fall short for representing 1/3 exactly as
a sequence of decimal digits. Suppose, we are allotted 4 digits to represent (the
fractional part) of a number, then the error in the representation is
.0000333… = 10-4 x .3333…
Thus 10-4 x .3333 is round-off error in the representation of the number 1/3 using 4
decimal digits on a paper. The numbers in the computer systems are represented in
binary form, generally using floating point representation. The error in representation
of a number due to fixed finite space allotted to represent it, is called round-off error.
Truncation Error
Truncation error in the values of a function arise due to the method used for
computing the values of the function. Generally, the method giving rise to truncation
error is a infinite process, i.e., involves steps.
f(x) = ex
at a point x is given by
x2 x3 x4
f(x) = 1 + x + + + + ......
2! 3! 4!
But, as it is impossible to execute the infinitely many steps of computing and adding
xn
for all n, the process has to be truncated after finite number of steps say after
n!
x3
computing and adding . Then the error in the value of f(x) is given by
3!
x4 x5
+ + ...... and is called truncation error.
4! 5!
We may note the difference between round-off error and truncation error
The round-off error in the representation of a number which possibly requires infinite
space for its exact representation. On the other hand truncation error in the computed
value of a function at a point, is due to the fact that the computation process for
computing the value may have infinite steps. But, as infinite number of steps can not
be executed, hence we are compelled to stop the process after some finite number of
steps. But this truncation of an infinite process after finite number of steps leads to an
error called truncation error.
Definition: Let f(h) be the exact analytical value of a given function obtained by
using an analytical formula and fh be the approximate value obtained by using a
6
numerical method. If the error f(h)─fh = C hp+1, where C is a constant, then p is Numerical
Differentiation
known as the order of the numerical method, and is denoted by O(hp).
The Method
Let us consider a function f (x), whose values are given at a set of tabular points. For
developing numerical differentiation formulas for the derivatives f ′ (x), f ′′ (x), …at a
point x = xk, we express the derivative fq (x), q ≥ 1, as a linear combination of the
values of f(x) at an arbitrarily chosen set of tabular points. Here, we assume that the
tabular points are equally spaced with the step-length h, i.e., various step (nodal)
points are xm = x0 ± mh, m = 0, 1, … etc. Then we write
n
hqfq (xk) = ∑
m = −s
γm fk+m, (1)
where γ i for i = ─s, ─s+1,……,n are the unknowns to be determined and fk+m
denotes f(xk+mh). For example, when s = n = 1 and q = 1, Eqn. (1) reduces to
d p +1
m
dx p +1 (x ) = 0, for m = 0, 1, .., p.
Let us now illustrate this idea to find the numerical differentiation formula of O (h ) 4
for f ′′ (xk).
Let f-2, f-1, f0, f1, f2 denote the values of f(x) at x = ─2h, ─h, 0, h, 2h respectively. In
this case the formula given by Eqn. (1) can written as
As there are five unknown to be determined let us make the formula exact for f(x) = 1,
x, x2, x3, x4. Then, we have
Substituting these values in Eqn. (2), we obtain the following set of equations for
determining γm, m = 0, ± 1, ± 2.
γ-2 + γ-1 + γ0 + γ1 + γ2 = 0
─2γ-2 ─γ-1 + γ1 + 2 γ2 = 2
Thus we have a system of five equations for five unknowns. The solution of this
system of Eqns. (4) is
Eqn. (2) is
f “ (0) ≈ f“0 =
1
[− f −2 + 16f −1 − 30f 0 + 16f1 − f 2 ] (5)
12h 2
Now, we know that TE of the formula (5) is given by the first non-zero term in the
Taylor expression of
1
f " (x0) ─ [− f (x 0 − 2h ) + 16f (x 0 − h ) − 30f ( x 0 ) + 16f (x 0 + h ) − f (x 0 + 2h )] (6)
12h 2
4h 3 2h 4 IV
f(x0─2h) = f(x0) – 2hf ’ (x0) + 2h2 f ” (x0) ─ f ' ' ' (x 0 ) + f (x 0 )
3 3
4h 5 V 4h 6 VI
─ f (x 0 ) + f ( x 0 ) − .....
15 45
h2 h3 h 4 IV h5 V
f(x0─h) = f(x0) – hf ‘ (x0) + f " (x 0 ) − f ' ' ' (x 0 ) + f (x 0 ) − f (x 0 )
2 6 24 120
h 6 VI
+ f ( x 0 ) + .......
720
h2 h3 h4 h5 V
f ( x 0 + h ) = f ( x 0 ) + hf ' ( x 0 ) + f " ( x 0 ) + f ' ' ' ( x 0 ) + f IV ( x 0 ) + f (x 0 )
2 6 24 120
h 6 IV
+ f ( x 0 ) + ......
720
2h 2 4h 3 2h 4 IV 4h 5 V
f ( x 0 + 2h ) = f ( x 0 ) + 2hf ' ( x 0 ) + f ' ' (x 0 ) + f ' ' ' (x 0 ) + f (x 0 ) + f (x 0 )
2 3 3 15
8
Numerical
4h 6 VI
+ f ( x 0 ) + ............. Differentiation
45
Substituting these expansions in Eqn. (6) and simplifying, we get the first non-zero
term or the TE of the formula (5) as
TE = f ' ' ( x 0 ) −
1
12h 2
[
− f ( x 0 − 2h ) + 16 f ( x 0 − h ) − 30f ( x 0 ) + 16f ( x 0 + h ) − f ( x 0 + 2h ) ]
h 6 VI
= − f (α ), 0 < α < 1.
90
You must have observed that in the numerical differentiation formula discussed
above, we have to solve a system of equations. If the number of nodal points involved
is large or if we have to determine a method of high order, then we have to solve a
large system of linear equations, which becomes tedious. To avoid this, we can use
finite difference operators to obtain the differentiation formulas, which we shall
illustrate in the next section.
E=∆+1
= (1 - ∇)-1
1 1/ 2
µ= (E + E −1 / 2 )
2
ln E = loge E
= [ 1 + hD + h 2 D 2 + ... ] f (x)
= ehD f(x) (7)
∆2 ∆3 ∆4
hD = ln E = ln (1 + ∆ ) = ∆ − + − + ....... (9)
2 3 4
∇ 2 ∇3 ∇ 4
hD = 1n E = − 1n (1 − ∇) = ∇ + + − + ... (10)
2 3 4
[ ]
δf ( x ) = e hD / 2 − e − hD / 2 f ( x ) +
δ2
and µ 2 = cosh2 (hD/2) = 1 + sinh2 (hD/2) = 1 + (14)
4
hD = 2sinh-1 ( δ /2)
Notice that this formula involves off-step points when operated on f(x). The formula
involving only the step points can be obtained by using the relation (13), i.e.,
hD = sinh-1 ( µ δ )
12 µ 3 δ 3 12 .3 2 .µ 5 δ 5 12 .3 2 .5 2 .µ 7 δ 7
= µδ − + − + ... (16)
3! 5! 7!
δ3 δ5 δ7
hD = µ δ − + − + ... (17)
6 30 140
Thus, Eqns. (9), (10) and (17) give us the relation between hD and various difference
operators. Let us see how we can use these relations to derive numerical
differentiation formulas for f 'k , f "k etc.
∆2 ∆3 1
0(h3) method : hf ' k = ∆ − + f k = (2f k + 3 − 9f k + 2 + 18f k +1 − 11f k ) (20)
2 3 6
0(h4) method :
∆2 ∆3 ∆4 1
hf ' k = ∆ − + − f = (− 3f k + 4 + 16f k + 3 − 36f k + 2 + 48f k +1 − 25f k ) (21)
2 3 4 k 12
1
TE = f ' ( x k ) − [f (x k +1 ) − f (x k )] = − h f " (ξ) (22)
h 2
2
1
TE = f ' ( x k ) − [− f (x k + 2 ) + 4f ( x k +1 ) − 3f ( x k )]2 = h f ' ' ' (ξ) (23)
2h 3
Similarly the TE of formulas (20) and (21) can be calculated. Backward difference
formulas of 0(h) 0(h2), 0(h3) and 0(h4) for fk can be obtained in the same way by
using the equality (10) and retaining respectively 1,2,3 or 4 terms. We are leaving it
as an exercise for you to derive these formulas.
Ex. 2) Derive backward difference formulas for f ′k of 0(h), 0(h2), 0(h3) and 0(h4).
Central difference formulas for f ′k can be obtained by using the relation (17), i.e.,
δ3
hf ' k = µ δ − + ... f k
6
Note that relation (17) gives us methods of 0(h2) and 0(h4), on retaining respectively 1
and 2 terms, as follows:
1
0(h 2 ) method : hf ' k = (f k +1 − f k −1 ) (24)
2
1
0(h 4 ) method : hf ' k = (− f k − 2 + 8f k −1 + 8f k +1 + f k + 2 ) (25)
12
11
Differentiation, We now illustrate these methods through an example.
Integration and
Differential Equations
Example 1: Given the following table of values of f(x) = ex, find f ′ (0.2) using
formulas (18), (19), (24) and (25).
f (0.3) − f (0.2 )
Using (18), f ' (0.2) =
0.1
1.349859 − 1.221403
or f ' (0.2) =
0 .1
= 1.28456
h 1
TE = − f ' ' (0.2) = − e 0.2 = −0.061070
2 2
1
Using (19), f ' (0.2) = [− f (0.4) + 4f (0.3) − 3f (0.2)] = 1.21701
0.2
h2 0.01 0.2
TE = f ' ' ' (0.2) = e = 0.004071;
3 3
1
Using (24), f ' (0.2) = [f (0.3) − f (0.1)] = 1.22344
0.2
h2 0.01 0.2
TE = − f ' ' ' (0.2) = − e = − 0.0020357
6 6
11 4 2 5
h 2 D 2 = ∆2 − ∆3 + ∆ − ∆ + ... (26)
12 3
11 4 2 5
= ∇2 + ∇3 + ∇ + ∇ + ... (27)
12 3
δ4 δ6
= δ2 − + − ... (28)
12 90
12
We can write the forward difference methods of 0(h), 0(h2), 0(h3) and 0(h4) for f ’’k Numerical
Differentiation
using Eqn. (26) and retaining 1,2,3 and 4 terms respectively as follows:
1
0(h 3 ) method : h 2 f " k = (11f k + 4 − 56 f k +3 + 114f k + 2 − 104f k +1 + 35f k ) (31)
12
1
0(h 4 ) method : h 2 f " k = (− 8f k +5 + 51f k + 4 − 136f k +3 + 194f k + 2 − 144f k +1 + 43f k ) (32)
12
Backward difference formulas can be written in the same way by using Eqn. (27).
Central difference formulas of 0(h2) and 0(h4) for f ”k are obtained by using Eqn. (28)
and retaining 1 or 2 terms respectively as follows:
1
0(h 4 ) method : h 2 f " k = (− f k − 2 + 16f k −1 − 30f k + 16f k +1 − f k + 2 ) (34)
12
Example 2: For the table of values of f(x) = ex, given in Example 1, find f ” (0.2)
using the formulas (33) and (34).
1
Solution: Using (33), f " (0.2) = [f (0.1) − 2f (0.2) + f (0.3)] = 1.2224
0.01
h 4 f VI (0.2)
TE = = 0.13571× 10 −5
90
Ex. 3) From the following table of values find f ′ (6.0) using an 0(h) formula and
f ′′ (6.3) using an 0(h2) formula.
In Secs. 5.2 and 5.3, we have derived numerical differentiation formulas to obtain the
derivative values at nodal points or step points, when the function values are given in
the form of a table. However, these methods cannot be used to find the derivative
values at off-step points. In the next section we shall derive methods which can be
used for finding the derivative values at the off-step points as well as at steps points.
We shall first derive differentiation formulas for the derivatives using non-uniform
nodal points. That is, when the difference between any two consecutive points is not
uniform.
In Unit 4 you have seen that the Lagrange interpolating polynomial fitting the data
(xk, fk), k = 0, 1, …, n is given by
n
Pn ( x ) = ∑L
k =0
k (x) f k (35)
π( x )
L k (x) = (36)
(x − x k ) π ' (x k )
π( x ) ( n +1)
E n ( x ) = f ( x ) − Pn ( x ) = f (α), x 0 < α < x n
(n + 1) !
n
P ' n (x ) = ∑ L'
k =0
k (x) f k (39)
E ' n (x) =
1
π' ( x ) f
(n + 1) !
( n +1)
( ) ′
(α ) + π ( x ) f ( n +1) (α )
(40)
Since in Eqn. (40), the function α (x) is not known in the second term on the hand
side, we cannot evaluate E′n (x) directly. However, since at a nodal point π(xk) = 0,
we obtain
π' ( x k ) ( n +1)
E ' n (x k ) = f (α ) (41)
(n + 1) !
If we want to obtain the differentiation formulas for any higher order, say qth
(1 ≤ q ≤ n ) order derivative, then we differentiate Pn (x), q times and get
n
f (q ) ( x ) ≈ P n
(q )
(x ) = ∑L (q)
k (x) f k (42)
k=0
Example 3: Find f′(x) and the error of approximation using Lagrange Interpolation
for the data (xk, fk), k = 0, 1.
x − x1 x − x0
Where L0 ( x ) = and L1 ( x ) =
x 0 − x1 x1 − x 0
Now,
P'1 ( x ) = L ′0 ( x ) f 0 + L'1 ( x ) f 1
1 1
and L'0 ( x ) = , L'1 ( x ) =
x 0 − x1 x1 − x 0
f0 f1 (f − f )
Hence, f ' ( x ) = P'1 ( x ) = + = 1 0 (43)
x 0 − x 1 x 1 − x 0 ( x1 − x 0 )
(x 0 − x 1 ) (x − x 0 )
E '1 ( x 0 ) = f " (α) and E'1 ( x 1 ) = 1 f " (α), x 0 < α < x 1.
2 2
Example 4: Find f ′ (x) and f′′(x) given f0, f1, f2 at x0, x1, x2 respectively, using
Lagrange interpolation. 15
Differentiation, Solution: By Language’s interpolation formula
Integration and
Differential Equations
f ( x ) ≈ P2 ( x ) = L 0 ( x ) f 0 + L1 ( x ) f1 + L 2 ( x ) f 2
where,
( x − x1 ) ( x − x 2 ) 2 x − x1 − x 2
L0 (x ) = ; L'0 ( x ) =
( x 0 − x1 ) ( x 0 − x 2 ) ( x 0 − x1 ) ( x 0 − x 2 )
(x − x 0 ) (x − x 2 ) 2x − x 0 − x 2
L1 ( x ) = ; L'1 ( x ) =
( x1 − x 0 ) ( x1 − x 2 ) ( x1 − x 0 )( x1 − x 2 )
( x − x 0 ) ( x − x1 ) 2 x − x 0 − x1
L2 (x ) = ; L '2 ( x ) =
( x 2 − x 0 ) ( x 2 − x1 ) ( x 2 − x 0 ) ( x 2 − x1 )
Example 5: Given the following values of f(x) = In x, find the approximate value of
f ′ (2.0) and f ′′(2.0). Also find the errors of approximations.
2x 0 − x1 − x 2 x0 − x2 x 0 − x1
f ' (x 0 ) = P' 2 (x 0 ) = f0 + f1 + f2
(x 0 − x1 )(x 0 − x 2 ) (x1 − x 0 )(x1 − x 2 ) (x 2 − x 0 ) ( x 2 − x 1 )
∴we get
4 − 2.2 − 2.6 2 − 2.6
f ' (2.0) = (0.69315) + (0.78846)
(2 − 2.2) (2 − 2.6) (2.2 − 2)(2.2 − 2.6)
2 − 2 .2
+ (0.95551) = 0.49619
( 2.6 − 2) (2.6 − 2.2)
Error is given by
1
E'2 ( x 0 ) = ( x 0 − x1 ) ( x 0 − x 2 ) f ' ' ' (2.0)
6
1
= (2.0 − 2.2) (2.0 − 2.6)(−0.25) = − 0.005
6
16
Similarly, Numerical
Differentiation
f0 f1 f2
f "(x 0 ) = 2 + +
( x 0 − x1 )( x 0 − x 2 ) ( x1 − x 0 )( x1 − x 2 ) ( x 2 − x 0 )( x 2 − x1 )
= ─ 0.19642
Error is given by
E" 2 ( x 0 ) =
1
3
1
[
(2 x 0 − x 1 − x 2 ) f ' ' ' (2.0) + ( x 0 − x 1 ) ( x 0 − x 2 ) f IV (2.0) + f IV (2.0)
6
]
= ─ 0.05166
Ex.5) Use Lagrange’s interpolation to find f ′ (x) and f ′′(x) at each of the values
x = 2.5; 5.0 from the
following table
x : 1 2 3 4
f(x) : 1 16 81 256
Let the data (xk, fk), k = 0, 1, …, n be given at (n+1) points where the step points
xk, k = 0, 1, …, n are equispaced with step length h. That is, we have
xk = x0 + kh, k = 1, 2, …, n.
(x − x 0 ) ( x − x 0 )( x − x1 ) 2
f ( x ) = Pn ( x ) = f 0 + ∆ f0 + ∆ f 0 + ...
h 2!h 2
( x − x 0 ) ( x − x1 ) ...( x − x n −1 ) ∆n f 0 .
+ (44)
n!h n
with error
( x − x 0 ) ( x − x 1 ) ... ( x − x n )
E n (x) = ∆n +1 f (α), x 0 < α < x n. (45)
(n + 1) ! h n +1
17
Differentiation, x − x0
Integration and If we put = s or x = x0 + sh, then Eqns. (44) and (45) reduce respectively to
Differential Equations h
s∆ f 0 s(s − 1) ∆2 f 0 s(s − 1) (s − 2) ∆3 f 0
f (s) = Pn (s) = f 0 + + + + ...
1! 2! 3!
s(s − 1) ... (s − n + 1) ∆n f 0
+ (46)
n!
and
dP dp ds 1 dP(s)
= × = .
dx ds dx h ds
ds 1
Q dx = 0 + h ds or = .
dx h
1 (2s − 1) 2 (3s 2 − 6s + 2) 3
P' n ( x ) = ∆ f 0 + ∆ f0 + ∆ f 0 + ... (48)
h 2 6
which is same as formula (9) obtained in Sec. 5.3 by difference operator method. We
can obtain the derivative at any step or off-step point by finding the value of s and
substituting the same in Eqn. (48). The formula corresponding to Eqn. (48) in
backward differences is
1 (2s + 1) 2 (2s 2 + 6s + 2) 3
P' n ( x ) = ∇ f n + ∇ fn + ∇ f n + ... (49)
h 2 6
where x = xn + sh.
Formulas for higher order derivatives can be obtained by differentiating P′n (x) further
and the corresponding error can be obtained by differentiating E′n (x).
Example 6: Find the first and second derivatives of f(x) at x = 1.1 from the
following tabulated values.
0.4160 0.0480
1.4 0.5440 0.3360 0.0000
0.7520 0.0480 0.0000
1.6 1.2960 0.3840 0.0000
1.1360 0.0480
1.8 2.4320 0.4320
1.5680
2.0 4.0000
1 .1 − 1
Since, x = x0 +s h, x0 =1, h = 0.2 and x = 1.1, we have s = = 0 .5
0 .2
Substituting the value of s in formula (48), we get
1 0.25 3
f ' (1.1) = ∆f 0 − ∆ f0 (50)
h 6
f ′ (1.1) = 0.63
f " ( x ) = P" ( x ) =
1 2
h
[
∆ f 0 + (s − 1) ∆3f 0 ]
Note: If you construct a forward difference interpolating polynomial P(x), fitting the
data given in Table 1, you will find that f(x) = P(x) = x3 –3x +2. Also, f ′ (1.1) = 6.3,
f ′′ (1.1) = 6.6. The values obtained from this equation or directly as done above have
to be same as the interpolating polynomial is unique.
Solution: Since we are required to find the derivative at the right-hand end point, we
will use the backward difference formula. The backward difference table for the
given data is given by
19
Differentiation, Table 2
Integration and
Differential Equations X f(x) ∇f ( x ) ∇ 2 f (x) ∇ 3 f (x)
0.1 1.10517
0.11623
0.2 1.22140 0.01223
0.12846 0.00127
0.3 1.34986 0.01350
0.14196
0.4 1.49182
1 1
f ′ (0.4) = ∆f 3 + ∆2 f 3 + ∆3f 3
4 2
1 0.0135 0.00127
= 0.14196 + +
0 .1 2 3
= 1.14913
How about trying a few exercises now ?
Ex.6) The position f(x) of a particle moving in a line at different point of time xk is
given by the following table. Estimate the velocity and acceleration of the particle at
points x = 15 and 3.5
x : 0 1 2 3 4
E7) Construct a difference table for the following data
f(x) : ─25 ─9 0 7 15
Taking h = 0.2, compute f ′ (1.5) and the error, if we are given f (x) = ex
Ex.8) Compute f ′′ (0.6) from the following table using 0(h2) central difference
formula with step lengths h = 0.4, 0.2, 0.1.
Ex. 9) Using central difference formula of 0(h2) find f ′′ (0.3) from the given table
using
x step
: lengths
01 h = 0.1, 0.20.2 0.3 0.4 0.5
20
Numerical
1.5 SUMMARY Differentiation
1.6 SOLUTIONS/ANSWERS
E1) Let f ' ( x ) = α 0 f 0 + α 1 f 1 + α 2 f 2 . Setting f ( x ) = 1, x, x 2 we obtain
α 0 + α1 + α 2 = 0
(α1 + 2 α 2 ) h =1
(α 1 + 4 α 2 ) h 2 = 0, hence, α 1 + 4α 2 = 0
3 2 1
Solving we obtain α 0 = − , α 1 = and α 2 = − .
2h h 2h
− 3f 0 + 4f1 − f 2
Hence, f '0 =
2h
11f − 22f k −1 + 9f k − 2 − 6f k − 3
0(h3) method: hf 'k = k
6
25 f − 56 f k −1 + 36 f k −2 − 24 f k − 3 + 3f k − 4
0(h4) method: hf 'k = k
12
f (6.1) − f (6.0)
f ' (6.0) = = − 3.7480
0.1
Exact value f ′ (x) = 1/x = 0.002; f ′′′ (x) = -1/x2 = -0.4× 10-5
x 3 − 9x 2 + 26 x − 24 x 3 − 8x 2 + 19 x − 12
L 0 ( x ) = − ; L1 ( x ) =
6 2
x 3 − 7 x 2 + 14 x − 8 x 3 − 6x 2 + 11x − 6
L 2 ( x ) = − ; L3 ( x ) =
2 6
P' 3 (2.5) = 62.4167; P"3 (2.5) = 79; P ′3 (5) = 453.667; P"3 (5) = 234.
The exact values of f ′ (x) and f ′′ (x) are (from f(x) = x4)
E6) We are required to find f ′(x) and f ′′ (x) at x = 1.5 and 3.5 which are off-step
points. Using the Newton’s forward difference formula with x0 = 0, x= 1.5,
s = 1.5, we get f ′ (1.5) = 8. 7915 and f ′′ (1.5) = ─ 4.0834.
X f(x) ∆f ∆2 f ∆3 f ∆4 f
1.3 3.669
0.813
1.5 4.482 0.179
0.992 0.41
1.7 5.474 0.220 0.007
1.212 0.48
1.9 6.686 0.268 0.012
1.480 0.060
2.1 8.166 0.328 0.012
1.8.08 0.072
2.3 9.974 0.400
2.208
2.5 12.182
Taking x0 = 1.5 we see that s = 0 and we obtain from the interpolation formula
1 ∆2f 0 ∆3f 0 ∆4 f 0
f ' (1.5) = ∆
0 f − + − + ...
h 2 3 4
E8) Use the 0(h2) formula (33). With h = 0.1 f ′′ (0.6) = 1.2596, h = 0.2,
f ′′ (0.6) = 1.26545, h = 0.4, f ′′ (0.6) = 1.289394.
23
Differentiation,
Integration and
Differential Equations
24