0% found this document useful (0 votes)
3 views

interpolation technique

Uploaded by

hamadbahoo
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

interpolation technique

Uploaded by

hamadbahoo
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Interpolation

The process of finding the value of y corresponding to any value of x=𝑥𝑖 between 𝑥0 and
𝑥𝑛 is called interpolation.

The process of finding the value of y for any value of x that lies outside the interval [𝑥0 , 𝑥𝑛 ] is called
extrapolation.

It is difficult to find out the exact value of the function f(x) for any known value of x when it is given in
tabular form. In such cases we find out a interpolating function say g(x) satisfying the property that
f(𝑥𝑖 )=g(𝑥𝑖 ). It may be noted that g(x) is also known smoothing function. Once the function g(x) is
established, one can find the approximate value of f(x) for any value of x from g(x) to the required
degree of accuracy.

The study of interpolation is based on the concept of differences.

Finite differences

Let y=f(x) be the function with certain values 𝑦0 , 𝑦1 , . . . 𝑦𝑛 corresponding to equally spaced values
𝑥0 , 𝑥0 + ℎ, 𝑥0 + 2ℎ, . . . 𝑥0 + 𝑛ℎ. The value of the independent variable x is usually called the
argument and the corresponding functional value is known as entry.

The argument and entry are shown in a tabular form as follows.

Argument x 𝑥0 𝑥1 = 𝑥0 + 𝒉 𝑥𝑛 = 𝑥0 + 𝒏𝒉
Entry y=f(x) 𝑦0 = 𝒇(𝑥0 ) 𝑦1 = 𝒇(𝑥0 + 𝒉) 𝑦𝑛 = 𝒇(𝑥0 + 𝒏𝒉)

Finite differences are useful in determining the values of f(x) and its derivatives 𝑓 ′ (𝑥), 𝑓 ′′ (𝑥) for some
intermediate value of argument x. although there are many types of finite differences but we shall
discuss only the following. They are

i. Forward Difference Operator

ii. Backward Difference Operator

iii. Shift Operator

iv. Central Difference Operator

v. Mean Difference Operator

Forward Difference Operator

Forward difference operator of first order is usually denoted by ∆ and is defined as follows

∆𝑦0 = 𝑦1 − 𝑦0
∆𝑦1 = 𝑦2 − 𝑦1

∆𝑦𝑛 = 𝑦𝑛+1 − 𝑦𝑛

Similarly, second order differences are defined as:

∆2 𝑦0 = ∆𝑦1 − ∆𝑦0

∆2 𝑦0 = (𝑦2 − 𝑦1 ) − (𝑦1 − 𝑦0 )

= 𝑦2 − 2𝑦1 + 𝑦0

∆2 𝑦1 = ∆𝑦2 − ∆𝑦1 = 𝑦3 − 2𝑦2 + 𝑦1

∆2 𝑦𝑛 = ∆𝑦𝑛+1 − ∆𝑦𝑛

In general, the mth order differences is defined as

∆𝑚 𝑦𝑛 = ∆𝑚−1 𝑦𝑛+1 − ∆𝑚−1 𝑦𝑛

It may be noted that:

∆2 𝑦0 = ∆∆(𝑦0 )

= ∆(𝑦1 − 𝑦0 )

= ∆𝑦1 − ∆𝑦0

= (𝑦2 − 𝑦1 ) − (𝑦1 − 𝑦0 )

= 𝑦2 − 2𝑦1 + 𝑦0

∆3 𝑦0 = ∆∆2 𝑦0 = ∆(𝑦2 − 2𝑦1 + 𝑦0 )

= ∆𝑦2 − 2∆𝑦1 + ∆𝑦0

= (𝑦3 − 𝑦2 ) − 2(𝑦2 − 𝑦1 ) + (𝑦1 − 𝑦0 )

= 𝑦3 − 3𝑦2 + 3𝑦1 − 𝑦0

The coefficients on RHS are same as those of binomial coefficients. Moreover, the terms appear with
alternating signs. Thus,

∆𝑛 𝑦0 = 𝑦𝑛 − 𝑐1𝑛 𝑦𝑛−1 + 𝑐2𝑛 𝑦𝑛−2 − 𝑐3𝑛 𝑦𝑛−3 + ⋯ (−1)𝑛 𝑦0

Example find the forward difference table of the following data.


X 0 1 2 3 4

Y 7 9 11 15 17

Solution the difference table is shown as under

X Y ∆𝒚 ∆2 𝑦 ∆3 𝑦 ∆4 𝑦

0 7

1 9 0

2 2

2 11 2 -6

4 -4

3 15 -2

4 17

This table is known as forward difference table. The following code produces this table.
Backward Difference Operator

Backward difference operator of first order is usually denoted by (Nebla) and is defined as:

∇𝑦1 = 𝑦1 − 𝑦0

∇𝑦2 = 𝑦2 − 𝑦1

∇𝑦𝑛 = 𝑦𝑛 − 𝑦𝑛−1

Similarly, second order differences are defined as:

∇2 𝑦2 = ∇𝑦2 − ∇𝑦1

∇2 𝑦3 = ∇𝑦3 − ∇𝑦2

∇2 𝑦𝑛 = ∇𝑦𝑛 − ∇𝑦𝑛−1

In general, the mth order differences is defined as

∇𝑚 𝑦𝑛 = ∇𝑚−1 𝑦𝑛 − ∇𝑚−1 𝑦𝑛−1

It may be noted that:

∇2 𝑦0 = ∇∇(𝑦0 )

= ∇(𝑦1 − 𝑦0 )

= ∇𝑦1 − ∇𝑦0

= (𝑦2 − 𝑦1 ) − (𝑦1 − 𝑦0 )

= 𝑦2 − 2𝑦1 + 𝑦0

∇3 𝑦0 = ∇∇2 𝑦0 = ∇(𝑦2 − 2𝑦1 + 𝑦0 )

= ∇𝑦2 − 2∇𝑦1 + ∇𝑦0

= (𝑦3 − 𝑦2 ) − 2(𝑦2 − 𝑦1 ) + (𝑦1 − 𝑦0 )

= 𝑦3 − 3𝑦2 + 3𝑦1 − 𝑦0

An Important Note: if f(x) is a polynomial of degree n then nth finite difference of it is always constant
and the difference higher than n are always zero.

Shift Operator

The shift or displacement operator is usually denoted by E and is defined as:


𝜖𝑦𝑟 = 𝑦𝑟+1 𝑜𝑟 𝜖(𝑓(𝑥𝑟 )) = 𝑓(𝑥𝑟 + ℎ)

The effect of E is to shift or increase the functional value of 𝑦𝑟 or (𝑓(𝑥𝑟 ) by one interval to the next
higher value 𝑦𝑟+1 . The higher order operation of may be similarly defined by

∈2 𝑦𝑟 =∈ (∈ 𝑦𝑟 ) =∈ 𝑦𝑟+1 = 𝑦𝑟+2

𝑜𝑟

∈3 𝑦𝑟 = 𝑦𝑟+3

𝑜𝑟

∈𝑛 𝑦𝑟 = 𝑦𝑟+𝑛

This is equivalent to

∈𝑛 𝑓(𝑥𝑟 ) = 𝑓(𝑥𝑟 + 𝑛ℎ)

Central Difference Operator

Central difference operator is usually denoted by δ and defined as:

δ𝑦1 = 𝑦1 − 𝑦0
2

or

δ𝑦 1 = 𝑦𝑟+1 − 𝑦𝑟
𝑟+
2

silimarly,

𝛿 2 𝑦1 = 𝛿(𝛿𝑦1 ) =

Average/ Mean Difference Operator

The average or mean difference operator is usually denoted by and defined as:

𝜇𝑦𝑟 = 1⁄2 [𝑦 1 +𝑦 1]
𝑟+ 𝑟−
2 2

Or

1 1
𝜇[𝑓(𝑥𝑟 )] = 1⁄2 [𝑓(𝑥𝑟 + ) + 𝑓(𝑥𝑟 − )]
2 2

We may observe that averaging operator 𝜇 denoites the average or mean value at r of two adjacent
1 1
values at 𝑟 + and 𝑟 −
2 2
Interpolation with equally spaced data values

Newton’s forward interpolation formula

Let y=f(x) be the function with certain values 𝑦0 , 𝑦1 , . . . 𝑦𝑛 corresponding to equally spaced values
𝑥0 , 𝑥0 + ℎ, 𝑥0 + 2ℎ, . . . 𝑥0 + 𝑛ℎ. Where 𝑥𝑛 = 𝑥0 + 𝑛ℎ Now by definition

∆𝑦0 = 𝑦1 − 𝑦0

𝑦1 = 𝑦0 + ∆𝑦0

𝑦1 = (1 + ∆)𝑦0 (𝑎)

∆𝑦1 = 𝑦2 − 𝑦1

𝑦2 = ∆𝑦1 + 𝑦1

= (1 + ∆)𝑦1

= (1 + ∆)(1 + ∆)𝑦0

𝑦2 = (1 + ∆)2 𝑦0

Similarly,

𝑦3 = (1 + ∆)3 𝑦0

And

∆𝑦𝑛−1 = 𝑦𝑛 − 𝑦𝑛−1

𝑦𝑛 = 𝑦𝑛−1 + ∆𝑦𝑛−1

𝑦𝑛 = (1 + ∆)𝑦𝑛−1

𝑦𝑛 = (1 + ∆)𝑛 𝑦0

By binomial theorem,

𝑛(𝑛 − 1) 2 𝑛(𝑛 − 1)(𝑛 − 2) 3


= {1 + 𝑛∆ + ∆ + ∆ + . . . }𝑦0
2! 3!
𝑛(𝑛 − 1) 2 𝑛(𝑛 − 1)(𝑛 − 2) 3
= 𝑦0 + 𝑛∆𝑦0 + ∆ 𝑦0 + ∆ 𝑦0 + . . .
2! 3!
𝑥−𝑥0
Where 𝑛 = ℎ
and 𝑦(𝑥𝑛 ) = 𝑦𝑛

This is known as Newton Forward Interpolation Formula.


Example

The following data shows the volume V of gas for various temperature T. estimate v when t=2.5 from
the given data by using newton forward interpolation formula. Also compute the interpolating
polynomial

0 1 2 3 4 5

1 2 5 10 17 26

Solution
𝑡−𝑡0 2.5−2
Here h=1 hence, 𝑛 = ℎ
= 1
= 0.5

Now the Newton forward difference table is

T V v v 2 v 3
0 1
1
1 2 2
3 0
2 5 2
5 0
3 10 2
7 0
4 17 2
9
5 26

Using Newton Forward Interpolation Formula up to third difference, that is,

𝑛(𝑛 − 1) 2 𝑛(𝑛 − 1)(𝑛 − 2) 3


𝑦(𝑛) = 𝑦0 + 𝑛∆𝑦0 + ∆ 𝑦0 + ∆ 𝑦0
2! 3!
0.5(0.5 − 1) 0.5(0.5 − 1)(0.5 − 2)
= 5 + 0.5(5) + (2) + (0) = 7.25
2! 3!
𝑡−𝑡0 𝑡−0
For polynomial put 𝑛 = ℎ
= 1
=𝑡

𝑡(𝑡 − 1) 𝑡(𝑡 − 1)(𝑡 − 2)


𝑦(𝑡) = 1 + 𝑡(1) + (2) + (0)
2! 3!

= 1 + 𝑡 + 𝑡(𝑡 − 1)

= 1 + 𝑡 + 𝑡2 − 𝑡

= 𝑡2 + 1
Newton Backward Interpolation Formula

Let y=f(x) be the function with certain values 𝑦0 , 𝑦1 , . . . 𝑦𝑛 corresponding to equally spaced values
𝑥0 , 𝑥0 + ℎ, 𝑥0 + 2ℎ, . . . 𝑥0 + 𝑛ℎ. Where 𝑥𝑛 = 𝑥0 + 𝑛ℎ Now by definition

∇𝑦1 = 𝑦1 − 𝑦0

𝑦0 = 𝑦1 − ∇𝑦1

𝑦0 = (1 − ∇)𝑦1
𝑦0
𝑦1 =
(1 − ∇)1

𝑦1 = (1 − ∇)−1 𝑦0 (𝑎)

∇𝑦2 = 𝑦2 − 𝑦1

𝑦1 = 𝑦2 − ∇𝑦2

𝑦1 = (1 − ∇)𝑦2
𝑦1
𝑦2 =
(1 − ∇)

= (1 − ∇)−1 𝑦1

= (1 − ∇)−1 (1 − ∇)−1 𝑦0

𝑦2 = (1 − ∇)−2 𝑦0

Similarly,

𝑦𝑛 = (1 − ∇)−𝑛 𝑦0

By binomial theorem,

(−𝑛)(−𝑛 − 1) 2 −𝑛(−𝑛 − 1)(−𝑛 − 2) 3


= 𝑦0 − (−𝑛)∇𝑦0 + ∇ 𝑦0 − ∇ 𝑦0 + . . .
2! 3!
𝑛(𝑛 + 1) 2 𝑛(𝑛 + 1)(𝑛 + 2) 3
= 𝑦0 + 𝑛∇𝑦0 + ∇ 𝑦0 + ∇ 𝑦0 + . . .
2! 3!
𝑥−𝑥0
Where 𝑛 = ℎ
and 𝑦(𝑥𝑛 ) = 𝑦𝑛
This is known as Newton Backward Interpolation Formula.

Example

Using Newton’s Backward Difference Interpolation Formula, compute f(11.8) from the given tabulated
data

X 2 4 6 8 10 12 14
F(x) 23 93 259 569 1071 1813 2843

The difference table

X F(x) ∇𝑦 ∇2 𝑦 ∇3 𝑦 ∇4 𝑦
2 23
70
4 93 96
166 48
6 259 144 0
310 48
8 569 192 0
502 48
10 1071 240 0
11.8 742 48
X012 1813 288
1030
14 2843

𝑦−𝑦0 11.8−10
Here h=2 hence, 𝑛 = ℎ
= 2
= 0.9

Using Newton Backward Interpolation Formula up to fifth difference, that is,

𝑛(𝑛 + 1) 2 𝑛(𝑛 + 1)(𝑛 + 2) 3 𝑛(𝑛 + 1)(𝑛 + 2)(𝑛 + 3) 4


= 𝑦0 + 𝑛∇𝑦0 + ∇ 𝑦0 + ∇ 𝑦0 + ∇ 𝑦0 . . .
2! 3! 4!
0.9(0.9 + 1) 0.9(0.9 + 1)(0.9 + 2)
= 1071 + 0.9(502) + (192) + (48)
2! 3!
0.9(0.9 + 1)(0.9 + 2)(0.9 + 3)
+ (0) . . .
4!

= 𝟏𝟕𝟐𝟔. 𝟔𝟑𝟐

Central and divided difference interpolation


It is preferable to teach people art of fishing rather than to give them fish

Horses can be taken to the water but can’t be made to drink

Interpolation with unequally spaced data values

Newton forward and backward interpolation formulae posses the disadvantages that they only are
applicable when the data points are equally spaced. However, in practice, the data values may not be
equally spaced. We therefore develop new interpolation formulae for unequally spaced values of
independent variable.

Lagrange’s interpolation formula

Let 𝑦 = 𝑓(𝑥) be the function with values 𝑦0 , 𝑦1 , . . . 𝑦𝑛 corresponding to 𝑥0 , 𝑥1 , 𝑥2 , . . . 𝑥𝑛 , where


f(x) be a polynomial of degree n. then f(x) be expressed as

𝑦 = 𝑓(𝑥) = 𝑎0 (𝑥 − 𝑥1 )(𝑥 − 𝑥2 ) . . . (𝑥 − 𝑥𝑛 ) + 𝑎1 (𝑥 − 𝑥0 )(𝑥 − 𝑥2 ) . . . (𝑥 − 𝑥𝑛 )


+ . . . + 𝑎𝑛 (𝑥 − 𝑥0 )(𝑥 − 𝑥1 ) . . . (𝑥 − 𝑥𝑛−1 ).

Here 𝑎0 , 𝑎1 , . . . , 𝑎𝑛 are some constant to be determined. Putting 𝑥 = 𝑥0 , 𝑥 = 𝑥1 , . . . , 𝑥 = 𝑥𝑛 in turn


in equation (1), we obtain

𝑦0 = 𝑓(𝑥0 ) = 𝑎0 (𝑥0 − 𝑥1 )(𝑥0 − 𝑥2 ) . . . (𝑥0 − 𝑥𝑛 )

𝑜𝑟
𝑦0
𝑎0 =
(𝑥0 − 𝑥1 )(𝑥0 − 𝑥2 ) . . . (𝑥0 − 𝑥𝑛 )

𝑦1 = 𝑓(𝑥1 ) = 𝑎1 (𝑥1 − 𝑥0 )(𝑥1 − 𝑥2 ) . . . (𝑥1 − 𝑥𝑛 )

𝑜𝑟
𝑦1
𝑎1 =
(𝑥1 − 𝑥0 )(𝑥1 − 𝑥2 ) . . . (𝑥1 − 𝑥𝑛 )

𝑦𝑛 = 𝑓(𝑥𝑛 ) = 𝑎𝑛 (𝑥𝑛 − 𝑥0 )(𝑥𝑛 − 𝑥1 ) . . . (𝑥𝑛 − 𝑥𝑛−1 )

𝑜𝑟
𝑦𝑛
𝑎𝑛 =
(𝑥𝑛 − 𝑥0 )(𝑥𝑛 − 𝑥1 ) . . . (𝑥𝑛 − 𝑥𝑛−1 )

Substituting these values of 𝑎0 , 𝑎1 , . . . , 𝑎𝑛 in equation (1), we obtain


𝑛 𝑛 𝑛
(𝑥 − 𝑥𝑖 )
𝑦 = 𝑓(𝑥) = ∑ ∏ 𝑓(𝑥𝑗 ) = ∑ 𝐿𝑗 (𝑥) 𝑓(𝑥𝑗 )
(𝑥𝑗 − 𝑥𝑖 )
𝑗=0 𝑖=0 𝑗=0
𝑖≠𝑗

Example

The following table shows breaking strength (BS) against the force applied (F). Use lagrange’s
interpolation formula to find BS at F=7 from the following data given below

F 1 3 4

BS 4 12 19

Solution

Let F=x and BS=y As we see that there are three points of interpolation, hence Lagrange polynomial of
degree two is employed
2

𝑓(𝑥) = ∑ 𝐿𝑖 𝑦𝑖
𝑖=0

= 𝐿0 𝑦0 + 𝐿1 𝑦1 + 𝐿2 𝑦2

Here

(𝑥 − 𝑥1 )(𝑥 − 𝑥2 ) (𝑥 − 𝑥0 )(𝑥 − 𝑥2 ) (𝑥 − 𝑥0 )(𝑥 − 𝑥1 )


𝑓(𝑥) = 𝑦0 + 𝑦1 + 𝑦
(𝑥0 − 𝑥1 )(𝑥0 − 𝑥2 ) (𝑥1 − 𝑥0 )(𝑥1 − 𝑥2 ) (𝑥2 − 𝑥0 )(𝑥2 − 𝑥1 ) 2

(7 − 3)(7 − 4) (7 − 1)(7 − 4) (7 − 1)(7 − 3)


= 4+ 12 + 19
(1 − 3)(1 − 4) (3 − 1)(3 − 4) (4 − 1)(4 − 3)

4×3 6×3 6×4


= 4+ 12 + 19
−2 × −3 2 × −1 3×1

= 2 × 4 − 9 × 12 + 8 × 19

= 8 − 108 + 152

= 52

If we wish to find the interpolating polynomial, we have


(𝑥 − 𝑥1 )(𝑥 − 𝑥2 ) (𝑥 − 𝑥0 )(𝑥 − 𝑥2 ) (𝑥 − 𝑥0 )(𝑥 − 𝑥1 )
𝑓(𝑥) = 𝑦0 + 𝑦1 + 𝑦
(𝑥0 − 𝑥1 )(𝑥0 − 𝑥2 ) (𝑥1 − 𝑥0 )(𝑥1 − 𝑥2 ) (𝑥2 − 𝑥0 )(𝑥2 − 𝑥1 ) 2
(𝑥 − 3)(𝑥 − 4) (𝑥 − 1)(𝑥 − 4) (𝑥 − 1)(𝑥 − 3)
= 4+ 12 + 19
(1 − 3)(1 − 4) (3 − 1)(3 − 4) (4 − 1)(4 − 3)

𝑥 2 − 7𝑥 + 12 𝑥 2 − 5𝑥 + 4 𝑥 2 − 4𝑥 + 3
= 4+ 12 + 19
−2 × −3 2 × −1 3×1

2𝑥 2 − 14𝑥 + 24 − 18𝑥 2 + 90𝑥 − 72 + 19𝑥 2 − 76𝑥 + 57


=
3

Simplifying, we get

𝑦 = 𝑓(𝑥) = 𝑥 2 + 3

This is the required polynomial of degree two.

Numerical differentiation by Newton forward Interpolation Formula

Let 𝑦 = 𝑓(𝑥) be the function with certain values 𝑦0 , 𝑦1 , . . . 𝑦𝑛 corresponding to


𝑥0 , 𝑥1 , 𝑥2 , . . . 𝑥𝑛 , where 𝑥0 , 𝑥1 , 𝑥2 , . . . 𝑥𝑛 , are equally spaced so that 𝑥𝑛 = 𝑥0 + 𝑛ℎ. Now by
newton forward interpolation formula,

𝑛(𝑛 − 1) 2 𝑛(𝑛 − 1)(𝑛 − 2) 3


𝑦(𝑥𝑛 ) = 𝑦0 + 𝑛∆𝑦0 + ∆ 𝑦0 + ∆ 𝑦0 + . . .
2! 3!
𝑛(𝑛 − 1) 2 𝑛(𝑛 − 1)(𝑛 − 2) 3
𝑦(𝑥0 + 𝑛ℎ) = 𝑦0 + 𝑛∆𝑦0 + ∆ 𝑦0 + ∆ 𝑦0 + . . .
2! 3!

Putting n=r, we obtain

𝑟2 − 𝑟 2 (𝑟 3 − 3𝑟 2 + 2𝑟) 3 (𝑟 4 − 6𝑟 3 + 11𝑟 2 − 6) 4
𝑦(𝑥0 + 𝑟ℎ) = 𝑦0 + 𝑟∆𝑦0 + ∆ 𝑦0 + ∆ 𝑦0 + ∆ 𝑦0 + . . .
2! 3! 4!

Now differentiate w. r. to r we get

2𝑟 − 1 2 3𝑟 2 − 6𝑟 + 2 3 4𝑟 3 − 18𝑟 2 + 22𝑟 4
𝑦 ′ (𝑥0 + 𝑟ℎ)ℎ = ∆𝑦0 + ∆ 𝑦0 + ∆ 𝑦0 + ∆ 𝑦0 + . . .
2 6 24

1 2𝑟 − 1 2 3𝑟 2 − 6𝑟 + 2 3 2𝑟 3 − 9𝑟 2 + 11𝑟 4
𝑦 ′ (𝑥0 + 𝑟ℎ) = [∆𝑦0 + ∆ 𝑦0 + ∆ 𝑦0 + ∆ 𝑦0 + . . .
ℎ 2 6 12

This is known as first derivative Newton forward Interpolation Formula.

Differentiate w.r.to r once again, we get

1 6𝑟 − 6 3
𝑦 ′′ (𝑥0 + 𝑟ℎ)ℎ = [0 + ∆2 𝑦0 + ∆ 𝑦0 + . . .]
ℎ 6
1 2
𝑦 ′′ (𝑥0 + 𝑟ℎ) = 𝑦 ′′ (𝑥𝑟 ) = [∆ 𝑦0 + (𝑟 − 1)∆3 𝑦0 + . . .]
ℎ2

This is known as 2nd derivative Newton Forward Interpolation Formula.

Example

The table below shows the tabulated values of an unknown function y=f(x). Using Newton's formula of
numerical differentiation, find the first and second derivatives of f(x) at x=2. also develop these formula
in terms of independent variable x.

X 0 1 2 3 4

Y 1 3 7 13 21

X Y ∆𝑦 ∆2 𝑦 ∆3 𝑦
0 1
3-1=2
1 3 2
7-3=4 0
2 7 2
13-7=6 0
3 13 2
21-13=8
4 21

𝑥𝑟 = 𝑥0 + 𝑟ℎ

𝑥𝑟 − 𝑥0 2 − 1
𝑟= = =1
ℎ 1

1 2𝑟 − 1 2 3𝑟 2 − 6𝑟 + 2 3
𝑦 ′ (𝑥0 + 𝑟ℎ) = [∆𝑦0 + ∆ 𝑦0 + ∆ 𝑦0
ℎ 2 6

1 2(1) − 1 1
𝑦 ′ (0 + 2) = [6 + (2)] = 1 {6 + (2)} = 6 + 1 = 7
1 2 2

1 2
𝑦 ′′ (𝑥0 + 𝑟ℎ) = [∆ 𝑦0 ] = 2
ℎ2

Numerical differentiation by Newton Backward Interpolation Formula


Let y=f(x) be the function with certain values 𝑦0 , 𝑦1 , . . . 𝑦𝑛 corresponding to equally spaced values
𝑥0 , 𝑥1 = 𝑥0 + ℎ, 𝑥2 = 𝑥0 + 2ℎ, . . . 𝑥0 + 𝑛ℎ. Where 𝑥𝑛 = 𝑥0 + 𝑛ℎ Now by Newton’s Backward
Interpolation Formula,

𝑛(𝑛 + 1) 2 𝑛(𝑛 + 1)(𝑛 + 2) 3 𝑛(𝑛 + 1)(𝑛 + 2)(𝑛 + 3) 4


𝑦(𝑥𝑛 ) = 𝑦0 + 𝑛∇𝑦0 + ∇ 𝑦0 + ∇ 𝑦0 + ∇ 𝑦0 . . .
2! 3! 4!
𝑛(𝑛 + 1) 2 𝑛(𝑛 + 1)(𝑛 + 2) 3
𝑦(𝑥𝑛 = 𝑥0 + 𝑛ℎ) = 𝑦0 + 𝑛∇𝑦0 + ∇ 𝑦0 + ∇ 𝑦0 + . . .
2! 3!

Putting n=p

𝑝(𝑝 + 1) 2 𝑝(𝑝 + 1)(𝑝 + 2) 3 𝑝(𝑝 + 1)(𝑝 + 2)(𝑝 + 3) 4


𝑦(𝑥𝑝 ) = 𝑦0 + 𝑝∇𝑦0 + ∇ 𝑦0 + ∇ 𝑦0 + ∇ 𝑦0 . . .
2! 3! 4!

𝑦(𝑥𝑝 = 𝑥0 + 𝑝ℎ)
𝑝2 + 𝑝 2 (𝑝3 + 3𝑝2 + 2𝑝) 3
= 𝑦0 + 𝑝∇𝑦0 + ∇ 𝑦0 + ∇ 𝑦0
2! 3!
𝑝4 + 6𝑝3 + 11𝑝2 + 6𝑝 4
+ ∇ 𝑦0 . . .
4!

Now differentiate w . r to p, we get

2𝑝 + 1 2 3𝑝2 + 6𝑝 + 2 3 4𝑝3 + 18𝑝2 + 22𝑝 + 6 4


𝑦 ′ (𝑥0 + 𝑝ℎ)ℎ = ∇𝑦0 + ∇ 𝑦0 + ∇ 𝑦0 + ∇ 𝑦0 . . .
2! 3! 4!

1 2𝑝 + 1 2 3𝑝2 + 6𝑝 + 2 3 4𝑝3 + 18𝑝2 + 22𝑝 + 6 4


𝑦(𝑥0 + 𝑝ℎ) = {∇𝑦0 + ∇ 𝑦0 + ∇ 𝑦0 + ∇ 𝑦0 . . . }
ℎ 2! 3! 4!

1 2𝑝 + 1 2 3𝑝2 + 6𝑝 + 2 3 2𝑝3 + 9𝑝2 + 11𝑝 + 3 4


𝑦(𝑥0 + 𝑝ℎ) = {∇𝑦0 + ∇ 𝑦0 + ∇ 𝑦0 + ∇ 𝑦0 . . . }
ℎ 2! 3! 12

This is known as first derivative Newton Backward Interpolation Formula.

1 2 2 6𝑝 + 6 3
𝑦 ′′ (𝑥0 + 𝑝ℎ)ℎ = { ∇ 𝑦0 + ∇ 𝑦0 + . . . }
ℎ 2! 6
1 2
𝑦 ′′ (𝑥0 + 𝑝ℎ) = {∇ 𝑦0 + (𝑝 + 1)∇3 𝑦0 + . . . }
ℎ2

This is known as second derivative Newton Backward Interpolation Formula.

Example the deflection f(x) measured at various distance x from one end of a cantilever is given in the
following table

X 0.0 0.2 0.4 0.6 0.8 1.0


F(x) 0.0000 0.0456 0.1278 0.3494 0.4027 0.4825
Evaluate 𝑓 ′ (0.85) and 𝑓 ′′ (1.0)
Solution

X Y ∇𝑦 ∇2 𝑦 ∇3 𝑦 ∇4 𝑦 ∇5 𝑦
0.0 0.000
0.0456
0.2 0.0456 0.0366
0.0822 0.1028
0.4 0.1278 0.1394 -0.4105
0.2216 -0.3077 0.9130
0.6 0.3494 -0.1683 0.5025
0.0533 0.1948
0.8 0.4027 0.0265
0.0798
1.0 0.4825

𝑥𝑝 = 0.85 𝑥0 = 0.8 𝑎𝑛𝑑 ℎ = 0.2

𝑥𝑝 − 𝑥0 0.85 − 0.80 0.05


𝑝= = = = 0.25
ℎ 0.2 0.2

By backward differentiation formula

1 2𝑝 + 1 2 3𝑝2 + 6𝑝 + 2 3 2𝑝3 + 9𝑝2 + 11𝑝 + 3 4


𝑦(𝑥0 + 𝑝ℎ) = {∇𝑦0 + ∇ 𝑦0 + ∇ 𝑦0 + ∇ 𝑦0 . . . }
ℎ 2! 3! 12

𝑦(0.8 + 0.25(0.2))
1 2(0.25) + 1 3(0.25)2 + 6(0.25) + 2
= {0.0533 + (−0.1683) + (−0.3077)
0.2 2! 3!
2(0.25)3 + 9(0.25)2 + 11(0.25) + 3
+ (−0.4105) }
12

= 5{0.0533 − 0.126225 − 0.1891 − 0.1085}

= 5(−0.370525) = −1.85

You might also like