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

Interpolation Produces That Matches Exactly. The Function Then Can Be Utilized To Approximate

Interpolation is a technique to produce a function that matches given data points exactly and can then be used to estimate values at intermediate points. Newton's interpolation uses divided differences of the function values at data points to determine the coefficients of a polynomial that passes through those points. The coefficients for Newton's interpolation polynomial are the successive divided differences of the function evaluated at the data points.

Uploaded by

graphicalguru
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views

Interpolation Produces That Matches Exactly. The Function Then Can Be Utilized To Approximate

Interpolation is a technique to produce a function that matches given data points exactly and can then be used to estimate values at intermediate points. Newton's interpolation uses divided differences of the function values at data points to determine the coefficients of a polynomial that passes through those points. The coefficients for Newton's interpolation polynomial are the successive divided differences of the function evaluated at the data points.

Uploaded by

graphicalguru
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 44

Interpolation produces a

function that matches the given


data exactly. The function then
can be utilized to approximate
the data values at intermediate
points.
Interpolation may also be used
to produce a smooth graph of a
function for which values are
known only at discrete points,
either from measurements or
calculations.
Given data points
Obtain a function, P(x)
P(x) goes through the data points
Use P(x)
To estimate values at intermediate
points
Given data points:
At x
0
= 2, y
0
= 3 and at x
1
= 5, y
1
= 8
Find the following:
At x = 4, y = ?
x
y
2
5
3
8
?
4
P(x)
P(x) should satisfy the following conditions:
P(x = 2) = 3 and P(x = 5) = 8
( ) ( ) ( ) x L x L x P
1 0
8 3 + =
P(x) can satisfy the above conditions if
at x = x
0
= 2, L
0
(x) = 1 and L
1
(x) = 0 and
at x = x
1
= 5, L
0
(x) = 0 and L
1
(x) = 1
The conditions can be satisfied if L
0
(x) and
L
1
(x) are defined in the following way.
( ) ( )
2 5
2
and
5 2
5
1 0

=
x
x L
x
x L
At x = x
0
= 2, L
0
(x) = 1 and L
1
(x) = 0 and
at x = x
1
= 5, L
0
(x) = 0 and L
1
(x) = 1
( ) ( )
0 1
0
1
1 0
1
0
and
x x
x x
x L
x x
x x
x L

=
( ) ( ) ( ) x L x L x P
1 0
8 3 + =
( ) ( ) ( )
1 1 0 0
y x L y x L x P + =
( ) ( ) ( ) ( ) ( )
1 1 0 0
x f x L x f x L x P + =
Lagrange Interpolating Polynomial
( ) ( ) ( ) ( ) ( )
1 1 0 0
x f x L x f x L x P + =
( ) ( ) ( ) 8
2 5
2
3
5 2
5
|
.
|

\
|

+
|
.
|

\
|

=
x x
x P
( )
3
1 5
=
x
x P
( ) 333 6
3
1 4 5
4 . P =

=
The Lagrange interpolating polynomial
passing through three given points; (x
0
, y
0
),
(x
1
, y
1
) and (x
2
, y
2
) is:
( ) ( ) ( ) ( ) ( )
( ) ( )
2 2
1 1 0 0
x f x L
x f x L x f x L x P
+
+ =
( ) ( ) ( ) ( )
2 2 1 1 0 0
y x L y x L y x L x P + + =
( )
( )( )
( )( )
2 0 1 0
2 1
0
x x x x
x x x x
x L


=
At x
0
, L
0
(x) becomes 1. At all
other given data points L
0
(x) is 0.
( )
( )( )
( )( )
2 1 0 1
2 0
1
x x x x
x x x x
x L


=
At x
1
, L
1
(x) becomes 1. At all
other given data points L
1
(x) is 0.
( )
( )( )
( )( )
1 2 0 2
1 0
2
x x x x
x x x x
x L


=
At x
2
, L
2
(x) becomes 1. At all
other given data points L
2
(x) is 0.
( ) ( ) ( ) ( )
( )
n n
y x L . ..........
y x L y x L y x L x P
+ +
+ + =

2 2 1 1 0 0
( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( )
n n
x f x L . .......... x f x L
x f x L x f x L x P
+ + +
+ =
2 2
1 1 0 0

General form of the Lagrange Interpolating
Polynomial
) )...( )( )...( )( (
) )...( )( )...( )( (
) (
n k k k k k k k
n k k
k
x x x x x x x x x x
x x x x x x x x x x
x L


=
+
+
1 1 1 0
1 1 1 0
[
=
=

=
n
k i
i
i k
i
k
x x
x x
x L
0
) (
) (
) (
( )( )( )
( )( )
( )( )
0 1 2
1 1
1
k k
n n
x x x x x x
x x x x
x x x x
+




Numerator of
( )
k
L x
Denominator of
( )( )( )
( )( )
( )( )
0 1 2
1 1
1
k k k
k k k k
k n k n
x x x x x x
x x x x
x x x x
+




( )
k
L x
Find the Lagrange Interpolating
Polynomial using the three given points.
( ) ( )
( ) ( )
( ) ( ) 25 0 4
4 0 5 2
5 0 2
2 2
1 1
0 0
. , y , x
. , . y , x
. , y , x
=
=
=
( )
( )( )
( )( )
2 0 1 0
2 1
0
x x x x
x x x x
x L


=
( )
( )( )
( )( )
10 5 6
4 2 5 2 2
4 5 2
2
0
+ =


=
x . x
.
x . x
x L
( )
( )( )
( )( )
75 0
8 6

4 5 2 2 5 2
4 2
2
1
.
x x
. .
x x
x L
+
=


=
( )
( )( )
( )( )
2 1 0 1
2 0
1
x x x x
x x x x
x L


=
( )
( )( )
( )( )
3
5 5 4

5 2 4 2 4
5 2 2
2
2
+
=


=
x . x
.
. x x
x L
( )
( )( )
( )( )
1 2 0 2
1 0
2
x x x x
x x x x
x L


=
( ) ( ) ( ) ( ) ( )
( ) ( )
2 2
1 1 0 0
x f x L
x f x L x f x L x P
+
+ =
( ) ( )( )
( )
( ) 25 0
3
5 5 4

4 0
75 0
8 6

5 0 10 5 6
2
2
2
.
x . x
.
.
x x
. x . x x P
|
|
.
|

\
|
+
+
|
|
.
|

\
|
+
+
+ =
( ) 15 1 425 0 05 0
2
. x . x . x P + =
The three given points were taken from
the function
( )
x
x f
1
=
( ) ( ) ( )
325 . 0
15 . 1 3 425 . 0 3 05 . 0 3
2
=
+ = P
( ) 333 . 0
3
1
3 = = f
An approximation can be obtained
from the Lagrange Interpolating
Polynomial as:
Newtons Interpolating Polynomials
Newtons equation of a function that
passes through two points
( )
0 0
y , x and ( )
1 1
y , x is
( ) ( )
0 1 0
x x a a x P + =
Set
0
x x =
( )
0 0 0
P x y a = =
Set
1
x x =
( ) ( )
1 1 0 1 1 0
P x y a a x x = = +
( ) ( )
0 1 0
x x a a x P + =
0 1
0 1
1
x x
y y
a

=
Newtons equation of a function that passes
through three points
( )
0 0
y , x
and
( )
1 1
y , x
is
( )
2 2
x , y
( ) ( )
( )( )
0 1 0
2 0 1

P x a a x x
a x x x x
= +
+
To find
2
a
, set
2
x x =
( ) ( )
( )( )
2 0 1 2 0
2 2 0 2 1

P x a a x x
a x x x x
= +
+
1 0 2 1
2 1 1 0
2
2 0
y y y y
x x x x
a
x x



=

Newtons equation of a function that passes


through four points can be written by adding a
fourth term .
( ) ( )
( )( )
0 1 0
2 0 1

P x a a x x
a x x x x
= +
+
( )( )( )
3 0 1 2
a x x x x x x +
( ) ( )
( )( )
( )( )( )
0 1 0
2 0 1
3 0 1 2


P x a a x x
a x x x x
a x x x x x x
= +
+
+
The fourth term will vanish at all three
previous points and, therefore, leaving all
three previous coefficients intact.
Divided differences and the coefficients
f
i
x
| |
i
f x
The divided difference of a function,
with respect to
is denoted as
It is called as zeroth divided difference and is
simply the value of the function, f
at
i
x
| | ( )
i i
x f x f =
| |
1 i i
f x , x
+

f The divided difference of a function,
called as the first divided difference, is denoted
i
x with respect to
and
1 i
x
+
| |
| | | |
1
1
1
i i
i i
i i
f x f x
f x , x
x x
+
+
+

f The divided difference of a function,


called as the second divided difference, is
denoted as
i
x with respect to
and
1 i
x
+
,
2 i
x
+
| |
1 2 i i i
f x , x , x
+ +
| |
| | | |
1 2 1
1 2
2
i i i i
i i i
i i
f x , x f x , x
f x , x , x
x x
+ + +
+ +
+

| |
| | | |
1 2 3
1 2 3 1 2
3
i i i i
i i i i i i
i i
f x , x , x , x
f x , x , x f x , x , x
x x
+ + +
+ + + + +
+


The third divided difference with respect to
i
x
1 i
x
+ 2 i
x
+
3 i
x
+
,
and
,
The coefficients of Newtons interpolating
polynomial are:
| |
0 0
x f a =
| |
1 0 1
x , x f a =
| |
2 1 0 2
x , x , x f a =
| |
3 2 1 0 3
x , x , x , x f a =
| |
4 3 2 1 0 4
x , x , x , x , x f a =
and so on.
x
( ) x f
First
divided differences
Second
divided differences
Third
divided differences
0
x | |
0
x f


| |
| | | |
0 1
0 1
1 0
x x
x f x f
x , x f

=


1
x | |
1
x f
| |
| | | |
0 2
1 0 2 1
2 1 0
x x
x , x f x , x f
x , x , x f

=



| |
| | | |
1 2
1 2
2 1
x x
x f x f
x , x f

=

| |
| | | |
0 3
2 1 0 3 2 1
3 2 1 0
x x
x , x , x f x , x , x f
x , x , x , x f

=

2
x | |
2
x f
| |
| | | |
1 3
2 1 3 2
3 2 1
x x
x , x f x , x f
x , x , x f

=



| |
| | | |
2 3
2 3
3 2
x x
x f x f
x , x f

=

| |
| | | |
1 4
3 2 1 4 3 2
4 3 2 1
x x
x , x , x f x , x , x f
x , x , x , x f

=

3
x | |
3
x f
| |
| | | |
2 4
3 2 4 3
4 3 2
x x
x , x f x , x f
x , x , x f

=



| |
| | | |
3 4
3 4
4 3
x x
x f x f
x , x f

=

| |
| | | |
2 5
4 3 2 5 4 3
5 4 3 2
x x
x , x , x f x , x , x f
x , x , x , x f

=

4
x | |
4
x f
| |
| | | |
3 5
4 3 5 4
5 4 3
x x
x , x f x , x f
x , x , x f

=



| |
| | | |
4 5
4 5
5 4
x x
x f x f
x , x f

=


5
x | |
5
x f


Example
Find Newtons interpolating polynomial to
approximate a function whose 5 data points are
given below.
( )
f x
2.0 0.85467
2.3 0.75682
2.6 0.43126
2.9 0.22364
3.2 0.08567
x
i
i
x
| |
i
x f
| |
i i
x , x f
1
| |
i i i
x , x , x f
1 2
| |
i i
x , , x f
3
| |
i i
x , , x f
4
0 2.0 0.85467
-0.32617
1 2.3 0.75682 -1.26505
-1.08520 2.13363
2 2.6 0.43126 0.65522 -2.02642
-0.69207 -0.29808
3 2.9 0.22364 0.38695
-0.45990
4 3.2 0.08567
The 5 coefficients of the Newtons interpolating
polynomial are:
| |
0 0
0 85467 a f x . = =
| |
1 0 1
0 32617 a f x , x . = =
| |
2 0 1 2
1 26505 a f x , x , x . = =
| |
3 0 1 2 3
2 13363 a f x , x , x , x . = =
| |
4 0 1 2 3 4
2 02642 a f x , x , x , x , x . = =
( ) ( )
( )( )
( )( )( )
( )( )( )( )
0 1 0
2 0 1
3 0 1 2
4 0 1 2 3


P x a a x x
a x x x x
a x x x x x x
a x x x x x x x x
= +
+
+
+
( ) ( )
( )( )
( )( )( )
( )( )( )( )
0 85467 0 32617 2 0
-1.26505 2 0 2 3
2 13363 2 0 2 3 2 6
2 02642 2 0 2 3 2 6 2 9
P x . . x .
x . x .
. x . x . x .
. x . x . x . x .
=

+

P(x) can now be used to estimate the value of the
function f(x) say at x = 2.8.
( ) ( )
( )( )
( )( )( )
( )( )( )( )
2 8 0 85467 0 32617 2 8 2 0
-1.26505 2 8 2 0 2 8 2 3
2 13363 2 8 2 0 2 8 2 3 2 8 2 6
2 02642 2 8 2 0 2 8 2 3 2 8 2 6 2 8 2 9
P . . . . .
. . . .
. . . . . . .
. . . . . . . . .
=

+

( ) ( )
2 8 2 8 0 275 f . P . . ~ =

You might also like