SlideShare a Scribd company logo
CISE301_Topic5 1
SE301: Numerical Methods
Topic 5:
Interpolation
Lectures 20-22:
KFUPM
Read Chapter 18, Sections 1-5
CISE301_Topic5 2
Lecture 20
Introduction to Interpolation
Introduction
Interpolation Problem
Existence and Uniqueness
Linear and Quadratic Interpolation
Newton’s Divided Difference Method
Properties of Divided Differences
CISE301_Topic5 3
Introduction
Interpolation was used for
long time to provide an
estimate of a tabulated
function at values that are
not available in the table.
What is sin (0.15)?
x sin(x)
0 0.0000
0.1 0.0998
0.2 0.1987
0.3 0.2955
0.4 0.3894
Using Linear Interpolation sin (0.15) ≈ 0.1493
True value (4 decimal digits) sin (0.15) = 0.1494
CISE301_Topic5 4
The Interpolation Problem
Given a set of n+1 points,
Find an nth
order polynomial
that passes through all points, such that:
     
)
(
,
....,
,
)
(
,
,
)
(
, 1
1
0
0 n
n x
f
x
x
f
x
x
f
x
)
(x
fn
n
i
for
x
f
x
f i
i
n ,...,
2
,
1
,
0
)
(
)
( 

CISE301_Topic5 5
Example
An experiment is used to determine
the viscosity of water as a function
of temperature. The following table
is generated:
Problem: Estimate the viscosity
when the temperature is 8 degrees.
Temperature
(degree)
Viscosity
0 1.792
5 1.519
10 1.308
15 1.140
CISE301_Topic5 6
Interpolation Problem
Find a polynomial that fits the data
points exactly.
)
V(T
V
T
a
V(T)
i
i
n
k
k
k



0
ts
coefficien
Polynomial
:
e
Temperatur
:
Viscosity
:
k
a
T
V
Linear Interpolation: V(T)= 1.73 − 0.0422 T
V(8)= 1.3924
CISE301_Topic5 7
Existence and Uniqueness
Given a set of n+1 points:
Assumption: are distinct
Theorem:
There is a unique polynomial fn(x) of order ≤ n
such that:
,...,n
,
i
for
x
f
x
f i
i
n 1
0
)
(
)
( 

n
x
x
x ,...,
, 1
0
     
)
(
,
....,
,
)
(
,
,
)
(
, 1
1
0
0 n
n x
f
x
x
f
x
x
f
x
CISE301_Topic5 8
Examples of Polynomial Interpolation
Linear Interpolation
 Given any two points,
there is one polynomial of
order ≤ 1 that passes
through the two points.
Quadratic Interpolation
Given any three points there
is one polynomial of order ≤
2 that passes through the
three points.
CISE301_Topic5 9
Linear Interpolation
Given any two points,
The line that interpolates the two points is:
Example :
Find a polynomial that interpolates (1,2) and (2,4).
   
)
(
,
,
)
(
, 1
1
0
0 x
f
x
x
f
x
 
0
0
1
0
1
0
1
)
(
)
(
)
(
)
( x
x
x
x
x
f
x
f
x
f
x
f 




  x
x
x
f 2
1
1
2
2
4
2
)
(
1 





CISE301_Topic5 10
Quadratic Interpolation
 Given any three points:
 The polynomial that interpolates the three points is:
     
)
(
,
,
)
(
,
,
)
(
, 2
2
1
1
0
0 x
f
x
and
x
f
x
x
f
x
    
0
2
0
1
0
1
1
2
1
2
2
1
0
2
0
1
0
1
1
0
1
0
0
1
0
2
0
1
0
2
)
(
)
(
)
(
)
(
]
,
,
[
)
(
)
(
]
,
[
)
(
:
)
(
x
x
x
x
x
f
x
f
x
x
x
f
x
f
x
x
x
f
b
x
x
x
f
x
f
x
x
f
b
x
f
b
where
x
x
x
x
b
x
x
b
b
x
f



















CISE301_Topic5 11
General nth
Order Interpolation
Given any n+1 points:
The polynomial that interpolates all points is:
     
)
(
,
...,
,
)
(
,
,
)
(
, 1
1
0
0 n
n x
f
x
x
f
x
x
f
x
        
]
,
...
,
,
[
....
]
,
[
)
(
...
...
)
(
1
0
1
0
1
0
0
1
0
1
0
2
0
1
0
n
n
n
n
n
x
x
x
f
b
x
x
f
b
x
f
b
x
x
x
x
b
x
x
x
x
b
x
x
b
b
x
f












 
CISE301_Topic5 12
Divided Differences
0
1
1
0
2
1
1
0
0
2
1
0
2
1
2
1
0
0
1
0
1
1
0
]
,...,
,
[
]
,...,
,
[
]
,...,
,
[
......
..
.
.
.
.
DD
order
Second
]
,
[
]
,
[
]
,
,
[
DD
order
First
]
[
]
[
]
,
[
DD
order
Zeroth
)
(
]
[
x
x
x
x
x
f
x
x
x
f
x
x
x
f
x
x
x
x
f
x
x
f
x
x
x
f
x
x
x
f
x
f
x
x
f
x
f
x
f
k
k
k
k
k
k











CISE301_Topic5 13
Divided Difference Table
x F[ ] F[ , ] F[ , , ] F[ , , ,]
x0 F[x0] F[x0,x1] F[x0,x1,x2] F[x0,x1,x2,x3]
x1 F[x1] F[x1,x2] F[x1,x2,x3]
x2 F[x2] F[x2,x3]
x3 F[x3]
 
 


 







n
i
i
j
j
i
n x
x
x
x
x
F
x
f
0
1
0
1
0 ]
,...,
,
[
)
(
CISE301_Topic5 14
Divided Difference Table
f(xi)
0 -5
1 -3
-1 -15
i
x
x F[ ] F[ , ] F[ , , ]
0 -5 2 -4
1 -3 6
-1 -15
Entries of the divided difference
table are obtained from the data
table using simple operations.
CISE301_Topic5 15
Divided Difference Table
f(xi)
0 -5
1 -3
-1 -15
i
x
x F[ ] F[ , ] F[ , , ]
0 -5 2 -4
1 -3 6
-1 -15
The first two column of the
table are the data columns.
Third column: First order differences.
Fourth column: Second order differences.
CISE301_Topic5 16
Divided Difference Table
0 -5
1 -3
-1 -15
i
y
i
x
x F[ ] F[ , ] F[ , , ]
0 -5 2 -4
1 -3 6
-1 -15
2
0
1
)
5
(
3





0
1
0
1
1
0
]
[
]
[
]
,
[
x
x
x
f
x
f
x
x
f



CISE301_Topic5 17
Divided Difference Table
0 -5
1 -3
-1 -15
i
y
i
x
x F[ ] F[ , ] F[ , , ]
0 -5 2 -4
1 -3 6
-1 -15
6
1
1
)
3
(
15






1
2
1
2
2
1
]
[
]
[
]
,
[
x
x
x
f
x
f
x
x
f



CISE301_Topic5 18
Divided Difference Table
0 -5
1 -3
-1 -15
i
y
i
x
x F[ ] F[ , ] F[ , , ]
0 -5 2 -4
1 -3 6
-1 -15
4
)
0
(
1
)
2
(
6





0
2
1
0
2
1
2
1
0
]
,
[
]
,
[
]
,
,
[
x
x
x
x
f
x
x
f
x
x
x
f



CISE301_Topic5 19
Divided Difference Table
0 -5
1 -3
-1 -15
i
y
i
x
x F[ ] F[ , ] F[ , , ]
0 -5 2 -4
1 -3 6
-1 -15
)
1
)(
0
(
4
)
0
(
2
5
)
(
2 





 x
x
x
x
f
f2(x)= F[x0]+F[x0,x1] (x-x0)+F[x0,x1,x2] (x-x0)(x-x1)
CISE301_Topic5 20
Two Examples
x y
1 0
2 3
3 8
Obtain the interpolating polynomials for the two examples:
x y
2 3
1 0
3 8
What do you observe?
CISE301_Topic5 21
Two Examples
1
)
2
)(
1
(
1
)
1
(
3
0
)
(
2
2








x
x
x
x
x
P
x Y
1 0 3 1
2 3 5
3 8
x Y
2 3 3 1
1 0 4
3 8
1
)
1
)(
2
(
1
)
2
(
3
3
)
(
2
2








x
x
x
x
x
P
Ordering the points should not affect the interpolating polynomial.
CISE301_Topic5 22
Properties of Divided Difference
]
,
,
[
]
,
,
[
]
,
,
[ 0
1
2
0
2
1
2
1
0 x
x
x
f
x
x
x
f
x
x
x
f 

Ordering the points should not affect the divided difference:
CISE301_Topic5 23
Example
 Find a polynomial to
interpolate the data.
x f(x)
2 3
4 5
5 1
6 6
7 9
CISE301_Topic5 24
Example
x f(x) f[ , ] f[ , , ] f[ , , , ] f[ , , , , ]
2 3 1 -1.6667 1.5417 -0.6750
4 5 -4 4.5 -1.8333
5 1 5 -1
6 6 3
7 9
)
6
)(
5
)(
4
)(
2
(
6750
.
0
)
5
)(
4
)(
2
(
5417
.
1
)
4
)(
2
(
6667
.
1
)
2
(
1
3
4















x
x
x
x
x
x
x
x
x
x
f
CISE301_Topic5 25
Summary
.
polynomial
ing
interpolat
affect the
not
should
points
the
Ordering
methods
Other
-
2]
18.
[Section
ion
Interpolat
Lagrange
-
]
18.1
[Section
Difference
Divided
Newton
-
it
obtain
to
used
be
can
methods
Different
*
unique.
is
Polynomial
ing
interpolat
The
*
...,
,
2
,
1
,
0
)
(
)
(
:
Condition
ing
Interpolat n
i
for
x
f
x
f i
n
i 

CISE301_Topic5 26
Lecture 21
Lagrange Interpolation
CISE301_Topic5 27
The Interpolation Problem
Given a set of n+1 points:
Find an nth
order polynomial:
that passes through all points, such that:
     
)
(
,
....,
,
)
(
,
,
)
(
, 1
1
0
0 n
n x
f
x
x
f
x
x
f
x
)
(x
fn
n
i
for
x
f
x
f i
i
n ,...,
2
,
1
,
0
)
(
)
( 

CISE301_Topic5 28
Lagrange Interpolation
Problem:
Given
Find the polynomial of least order such that:
Lagrange Interpolation Formula:
n
i
for
x
f
x
f i
i
n ,...,
1
,
0
)
(
)
( 

)
(x
fn
….
….
1
x n
x
0
y 1
y n
y
i
x
i
y
 
 
 









n
i
j
j j
i
j
i
n
i
i
i
n
x
x
x
x
x
x
x
f
x
f
,
0
0
)
(
)
(
)
(


0
x
CISE301_Topic5 29
Lagrange Interpolation






j
i
j
i
x
x
j
i
th
i
1
0
)
(
:
s
polynomial
order
n
are
cardinals
The
cardinals.
the
called
are
)
(


CISE301_Topic5 30
Lagrange Interpolation Example
x 1/3 1/4 1
y 2 -1 7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
   
 
)
4
/
1
)(
3
/
1
(
2
7
)
1
)(
3
/
1
(
16
1
)
1
)(
4
/
1
(
18
2
)
(
4
/
1
1
4
/
1
3
/
1
1
3
/
1
)
(
1
4
/
1
1
3
/
1
4
/
1
3
/
1
)
(
1
3
/
1
1
4
/
1
3
/
1
4
/
1
)
(
)
(
)
(
)
(
)
(
)
(
)
(
)
(
2
1
2
1
0
2
0
2
2
1
2
0
1
0
1
2
0
2
1
0
1
0
2
2
1
1
0
0
2











































x
x
x
x
x
x
x
P
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
f
x
x
f
x
x
f
x
P






CISE301_Topic5 31
Example
Find a polynomial to interpolate:
Both Newton’s interpolation
method and Lagrange
interpolation method must
give the same answer.
x y
0 1
1 3
2 2
3 5
4 4
CISE301_Topic5 32
Newton’s Interpolation Method
0 1 2 -3/2 7/6 -5/8
1 3 -1 2 -4/3
2 2 3 -2
3 5 -1
4 4
CISE301_Topic5 33
Interpolating Polynomial
4
3
2
4
4
8
5
12
59
8
95
12
115
1
)
(
)
3
)(
2
)(
1
(
8
5
)
2
)(
1
(
6
7
)
1
(
2
3
)
(
2
1
)
(
x
x
x
x
x
f
x
x
x
x
x
x
x
x
x
x
x
f
















CISE301_Topic5 34
Interpolating Polynomial Using
Lagrange Interpolation Method
24
)
3
)(
2
)(
1
(
)
3
4
(
)
3
(
)
2
4
(
)
2
(
)
1
4
(
)
1
(
)
0
4
(
)
0
(
6
)
4
)(
2
)(
1
(
)
4
3
(
)
4
(
)
2
3
(
)
2
(
)
1
3
(
)
1
(
)
0
3
(
)
0
(
4
)
4
)(
3
)(
1
(
)
4
2
(
)
4
(
)
3
2
(
)
3
(
)
1
2
(
)
1
(
)
0
2
(
)
0
(
6
)
4
)(
3
)(
2
(
)
4
1
(
)
4
(
)
3
1
(
)
3
(
)
2
1
(
)
2
(
)
0
1
(
)
0
(
24
)
4
)(
3
)(
2
)(
1
(
)
4
0
(
)
4
(
)
3
0
(
)
3
(
)
2
0
(
)
2
(
)
1
0
(
)
1
(
4
5
2
3
)
(
)
(
4
3
2
1
0
4
3
2
1
0
4
0
4












































































x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
f
x
f
i
i
i











CISE301_Topic5 35
Lecture 22
Inverse Interpolation
Error in Polynomial Interpolation
CISE301_Topic5 36
Inverse Interpolation
given
is
where
,
)
(
:
that
such
Find
values
of
a table
Given
:
Problem
k
k y
y
x
f
x 
….
….
1
x n
x
0
y 1
y n
y
i
x
i
y
One approach:
Use polynomial interpolation to obtain fn(x) to interpolate the
data then use Newton’s method to find a solution to x
k
n y
x
f 
)
(
0
x
CISE301_Topic5 37
Inverse Interpolation
….
….
1
x n
x
0
y 1
y n
y
i
x
i
y
Inverse interpolation:
1. Exchange the roles
of x and y.
2. Perform polynomial
Interpolation on the
new table.
3. Evaluate
)
( k
n y
f
x 
….
….
i
y 0
y 1
y n
y
i
x 0
x 1
x n
x
0
x
CISE301_Topic5 38
Inverse Interpolation
x
y
y
x
CISE301_Topic5 39
Inverse Interpolation
Question:
What is the limitation of inverse interpolation?
• The original function has an inverse.
• y1, y2, …, yn must be distinct.
CISE301_Topic5 40
Inverse Interpolation
Example
5
.
2
)
(
that
such
Find
table.
the
Given
:
Problem

x
f
x
x 1 2 3
y 3.2 2.0 1.6
3.2 1 -.8333 1.0417
2.0 2 -2.5
1.6 3
2187
.
1
)
5
.
0
)(
7
.
0
(
0417
.
1
)
7
.
0
(
8333
.
0
1
)
5
.
2
(
)
2
)(
2
.
3
(
0417
.
1
)
2
.
3
(
8333
.
0
1
)
(
2
2














f
x
y
y
y
y
f
x
CISE301_Topic5 41
Errors in polynomial Interpolation
 Polynomial interpolation may lead to large
errors (especially for high order polynomials).
BE CAREFUL
 When an nth
order interpolating polynomial is
used, the error is related to the (n+1)th
order
derivative.
CISE301_Topic5 42
-5 -4 -3 -2 -1 0 1 2 3 4 5
-0.5
0
0.5
1
1.5
2
true function
10 th order interpolating polynomial
10th
Order Polynomial Interpolation
CISE301_Topic5 43
1
)
1
(
)
1
(
)
1
(
4
)
(
)
(
:
Then
points).
end
the
(including
b]
[a,
in
points
spaced
equally
1
at
es
interpolat
that
n
degree
of
polynomial
any
be
Let
.
)
(
and
b],
[a,
on
continuous
is
)
(
:
that
such
function
a
be
)
(
Let








 





n
n
n
n
a
b
n
M
x
-P
x
f
n
f
P(x)
M
x
f
x
f
x
f
Errors in polynomial Interpolation
Theorem
CISE301_Topic5 44
Example
9
10
1
)
1
(
th
10
34
.
1
9
6875
.
1
)
10
(
4
1
)
1
(
4
9
,
1
0
1
.
[0,1.6875]
interval
in the
points)
spaced
equally
0
1
(using
f(x)
e
interpolat
to
polynomial
order
9
use
want to
We
sin

















 







f(x)-P(x)
n
a
b
n
M
f(x)-P(x)
n
M
n
for
f
(x)
f(x)
n
n
CISE301_Topic5 45
Summary
 The interpolating polynomial is unique.
 Different methods can be used to obtain it.
 Newton’s divided difference
 Lagrange interpolation
 Others
 Polynomial interpolation can be sensitive to
data.
 BE CAREFUL when high order polynomials
are used.

More Related Content

PPT
interpolacrcrdcrdrcrdctctfct frfctfction.ppt
PPT
lagrange and newton divided differences.ppt
PDF
me310_6_interpolation.pdf for numerical method
PDF
Computational methods for engineering...
PDF
Applied numerical methods lec9
PPTX
Interpolation
PPT
Interpolation functions
PPT
Chap_18.ppt on interpolation basics undersatanding
interpolacrcrdcrdrcrdctctfct frfctfction.ppt
lagrange and newton divided differences.ppt
me310_6_interpolation.pdf for numerical method
Computational methods for engineering...
Applied numerical methods lec9
Interpolation
Interpolation functions
Chap_18.ppt on interpolation basics undersatanding

Similar to NUMERICAL ANALYSIS CH4CISE301-Topic5.ppt (20)

PDF
Lecture about interpolation
PDF
Interpolation techniques - Background and implementation
PDF
Interpolation(2) Numerical methods to CE Problems).pdf
PPTX
numericai matmatic matlab uygulamalar ali abdullah
PPTX
interpolation-190605141327 (1).pptx
PPTX
interpolation-190605141327 (1).pptx
PDF
Fortran chapter 2.pdf
PDF
Intro. to computational Physics ch2.pdf
PDF
a) Use Newton’s Polynomials for Evenly Spaced data to derive the O(h.pdf
PDF
Interpolation
PDF
Matlab
PPTX
Interpolation
PPTX
Interpolation.pptx
PDF
Interpolation
PDF
Interpolation wikipedia
PDF
$$$ Cheap breville bta630 xl
PDF
$$$ Cheap breville bta630 xl
PDF
Numerical analysis interpolation-III
PDF
ghgtnt fyjryh ryjyrjn rjyn1250fhfh0123196.pdf
PPTX
Lecture about interpolation
Interpolation techniques - Background and implementation
Interpolation(2) Numerical methods to CE Problems).pdf
numericai matmatic matlab uygulamalar ali abdullah
interpolation-190605141327 (1).pptx
interpolation-190605141327 (1).pptx
Fortran chapter 2.pdf
Intro. to computational Physics ch2.pdf
a) Use Newton’s Polynomials for Evenly Spaced data to derive the O(h.pdf
Interpolation
Matlab
Interpolation
Interpolation.pptx
Interpolation
Interpolation wikipedia
$$$ Cheap breville bta630 xl
$$$ Cheap breville bta630 xl
Numerical analysis interpolation-III
ghgtnt fyjryh ryjyrjn rjyn1250fhfh0123196.pdf
Ad

More from ahmedhussein561 (6)

PPT
NUMERICAL ANALYSIS CH6CISE301-Topic6.ppt
PPT
NUMERICAL ANALYSIS CISE301-Topic3.ppt
PPT
numerical analysis CISE301-Topic1.ppt
PPT
numerical analysis CISE301-Topic2.ppt
PPT
introduction numerical analysis lecture .ppt
PPT
introduction to numerical analysis .ppt
NUMERICAL ANALYSIS CH6CISE301-Topic6.ppt
NUMERICAL ANALYSIS CISE301-Topic3.ppt
numerical analysis CISE301-Topic1.ppt
numerical analysis CISE301-Topic2.ppt
introduction numerical analysis lecture .ppt
introduction to numerical analysis .ppt
Ad

Recently uploaded (20)

PPTX
OOP with Java - Java Introduction (Basics)
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
Construction Project Organization Group 2.pptx
PPTX
bas. eng. economics group 4 presentation 1.pptx
DOCX
573137875-Attendance-Management-System-original
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
Geodesy 1.pptx...............................................
PPT
Mechanical Engineering MATERIALS Selection
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PPT
Project quality management in manufacturing
PPTX
Lecture Notes Electrical Wiring System Components
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
OOP with Java - Java Introduction (Basics)
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
Foundation to blockchain - A guide to Blockchain Tech
Operating System & Kernel Study Guide-1 - converted.pdf
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Construction Project Organization Group 2.pptx
bas. eng. economics group 4 presentation 1.pptx
573137875-Attendance-Management-System-original
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
Geodesy 1.pptx...............................................
Mechanical Engineering MATERIALS Selection
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
Project quality management in manufacturing
Lecture Notes Electrical Wiring System Components
Model Code of Practice - Construction Work - 21102022 .pdf
Internet of Things (IOT) - A guide to understanding
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...

NUMERICAL ANALYSIS CH4CISE301-Topic5.ppt