NA Lecture 18 (N)
NA Lecture 18 (N)
Analysis
Lecture 18
Chapter 5
Interpolation
Finite
Finite Difference
Difference Operators
Operators
Newton’s
Newton’s Forward
Forward Difference
Difference
Interpolation
Interpolation Formula
Formula
Newton’s
Newton’s Backward
Backward Difference
Difference
Interpolation
Interpolation Formula
Formula
Lagrange’s
Lagrange’s Interpolation
Interpolation
Formula
Formula
Divided
Divided Differences
Differences
Interpolation
Interpolation in
in Two
Two Dimensions
Dimensions
Cubic
Cubic Spline
Spline Interpolation
Interpolation
Introduction
Finite
Finite differences
differences play
play an
an
important
important role
role in
in numerical
numerical
techniques,
techniques, where
where
tabulated
tabulated values
values of
of the
the
functions
functions are
are available.
available.
For
For instance,
instance, consider
consider aa
function
function
y f ( x).
As
As xx takes
takes values
values
x0 , x1 , x2 , , xn ,
let
let the
the corresponding
corresponding values
values
of
of yy be
be
y0 , y1 , y2 , , yn .
That is, for given a table of
values,
( xk , yk ), k 0,1, 2, , n;
Forward
Forward Differences
Differences
Backward
Backward Differences
Differences
Central
Central Difference
Difference
Forward
Differences
For a given table of values
( xk , yk ), k 0,1, 2,..., n
Thus, in general
2
yi yi 1 yi
2
Here is called the second
difference operator. Thus,
continuing, we can define,
r-th difference of y, as
r r 1 r 1
yi yi 1 yi
By defining a difference table
as a convenient device for
displaying various
differences, the above
defined differences can be
written down systematically
by constructing a difference
table for values
( xk , yk ), k 0,1,..., 6
Forward Difference Table
This difference table is called
forward difference table or
diagonal difference table.
Here, each difference is
located in its appropriate
column, midway between the
elements of the previous
column.
Please note that the subscript
remains constant along each
diagonal of the table. The first
term in the table, that is y0 is
called the leading term, while
the differences
2 3
y0 , y0 , y0 ,...
are called leading differences
Example
Construct a forward difference
table for the following values of
x and y:
Solution
Example
2 3
Express y0 and y0 in
terms of the values of
the function y.
Solution:
Noting that each higher order
difference is defined in terms
of the lower order difference,
we have
2
y0 y1 y0 ( y2 y1 ) ( y1 y0 )
y2 2 y1 y0
and
3 y0 2 y1 2 y0 (y2 y1 ) ( y1 y0 )
( y3 y2 ) ( y2 y1 ) ( y2 y1 ) ( y1 y0 )
y3 3 y2 3 y1 y0
n n n
y0 yn C1 yn 1 C2 yn 2
n n
C3 yn 3 ( 1) y0
Example
Show that the value of yn can
be expressed in terms of the
leading value y0 and the
leading differences
2 n
y0 , y0 , , y0 .
Solution
The forward difference table will be
y1 y0 y0 or y1 y0 y0
y2 y1 y1 or y2 y1 y1
y3 y2 y2 or y3 y2 y2
Similarly,
y1 y0 y0 or y1 y0 y0
2 2
2 2
y2 y1 y1 or y2 y1 y1
2 2 3 2 2 3
y2 y1 y1 or y2 y1 y1
2 2 3
y2 (y0 y0 ) ( y0 y0 )
2 3
y0 2 y0 y0
y3 y2 y2
2
( y1 y1 ) (y1 y1 )
2 3
y0 3y0 3 y0 y0
3
(1 ) y0
Similarly, we can symbolically
write y (1 ) y ,
1 0
2
y2 (1 ) y0 ,
3
y3 (1 ) y0
........
n
yn (1 ) y0
Hence, we obtain
n n 2
yn y0 C1y0 C2 y0
n 3 n
C3 y0 y0
n
yn Ci y0 n i
i 0
Numerical
Analysis
Lecture 18
Backward
Differences
For a given table of values
( xk , yk ), k 0,1, 2,..., n
of a function y = f (x) with
equally spaced abscissas, the
first backward differences are
usually expressed in terms of
the backward difference
operator as
yi yi yi 1i n, (n 1), ,1
y1 y1 y0
OR y2 y2 y1
yn yn yn 1
The differences of these
differences are called second
differences and they are
denoted by 2 y , 2 y , , 2 y .
2 3 n
That is 2
y1 y2 y1
2
y2 y3 y2
2
yn yn yn 1
Thus, in general, the second
backward differences are
2
yi yi yi 1 , i n, (n 1),..., 2
From 2
yi yi yi 1 , i n, (n 1),..., 2
2
We get yn 1 yn yn
From these equations, we
obtain
2
yn 2 yn 2yn yn
n 1 n 1
yi
n
yi (1 2) yi (1 2)
These central differences can
be systematically arranged as
indicated in the Table
Thus, we observe that all
the odd differences have a
fractional suffix and all the
even differences with the
same subscript lie
horizontally.
The following alternative
notation may also be adopted
to introduce finite difference
operators. Let y = f (x) be a
functional relation between x
and y, which is also denoted
by yx.
Suppose, we are given
consecutive values of x
differing by h say x, x + h, x +2h,
x +3h, etc. The corresponding
values of y are yx , yx h , yx 2 h , yx 3h ,
As before, we can form the
differences of these values.
Thus
y x yx h yx f ( x h) f ( x)
2
y x y x h yx
Similarly
y x y x y x h f ( x) f ( x h)
h h
yx y x ( h / 2) y x ( h / 2) f x f x
2 2
Numerical
Analysis
Lecture 18