0% found this document useful (0 votes)
23 views23 pages

Lecture Slides AMM Week 4 - Interpolation - Tagged

Uploaded by

tom.clarke99
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views23 pages

Lecture Slides AMM Week 4 - Interpolation - Tagged

Uploaded by

tom.clarke99
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Applied Mathematical

Methods

Anna Huber
Numerical Methods

Interpolation
Interpolation
• Estimation of intermediate values between precise
data points.
• The most common method is polynomial
interpolation
f ( x) a0  a1 x  a2 x 2    an x n

5
Introduction
• Although there is one and only one nth-order
polynomial that fits n+1 points, there are a variety
of mathematical formats in which this polynomial
can be expressed:
– The Newton polynomial
– The Lagrange polynomial
– The standard form
f ( x) a0  a1 x  a2 x 2    an x n

6
Newton’s Divided-Difference Interpolating
Polynomials
Linear Interpolation
• Is the simplest form of interpolation, connecting two data points
with a straight line. Slope and a
finite divided
f1 ( x)  f ( x0 ) f ( x1 )  f ( x0 ) difference

x  x0 x1  x0 approximation to
1st derivative
f ( x1 )  f ( x0 )
f1 ( x)  f ( x0 )  ( x  x0 ) Linear-interpolation
x1  x0 formula

• f1(x) designates that this is a first-order interpolating polynomial.


7
8
Example 1
• Estimate the natural log of 2 using linear
interpolation
a) between ln(1) = 0
and ln(6) = 1.7918
b) between ln(1) = 0
and ln(4) = 1.3863
2.0

1.5
y lnx 

1.0
f(x) True value

0.5
Linear estimates

0.0
0 1 2 3 4 5 6 7

x
Newton’s Divided-Difference Interpolating Polynomials
Quadratic Interpolation
• If three data points are available, the
estimate is improved by introducing some
curvature into the line connecting the
points.

• A simple procedure can be used to


determine the values of the coefficients.
𝑥=𝑥
𝑥=𝑥0 1

𝑥=𝑥2
Example 2
• Fit a second order polynomial to the points
x0 = 1 f(x0) = 0
x1 = 4 f(x1) = 1.3863
x2 = 6 f(x2) = 1.7918
• Estimate the natural log of 2 using quadratic
interpolation
Example 2
• Fit a second order polynomial to the points
x0 = 1 f(x0) = 0
x1 = 4 f(x1) = 1.3863
x2 = 6 f(x2) = 1.7918
• Estimate the natural log of 2 using quadratic
interpolation
2.0

1.5
y lnx 

f(x) 1.0
True value

Quadratic estimate
0.5
Linear estimate

0.0
0 1 2 3 4 5 6 7

x
General Form of Newton’s Interpolating
Polynomials

where

and

16
Advantages of Newton’s Interpolating
Polynomials

• Data points need not be equally spaced or


in ascending order
• Useful for sequential calculation
Lagrange Interpolating Polynomial
• The Lagrange interpolating polynomial is simply a
reformulation of the Newton’s polynomial that
avoids the computation of divided differences.
Lagrange Interpolating Polynomial
General Form of Lagrange Interpolating Polynomial

n
f n ( x)  Li ( x ) f ( xi )
i 0
n x  xj
Li ( x) 
j 0 xi  x j
j i
Interpolating Polynomials
• The Lagrange polynomial and the Newton’s
polynomial are different formulations of the
same thing.
• Data points need not be equally spaced or
in ascending order
• Newton’s most useful for sequential
calculation
• Lagrange often used when the order of the
polynomial is known a priori
Coefficients of an Interpolating Polynomial
• Although both the Newton and Lagrange
polynomials are well suited for determining
intermediate values between points, they do not
provide a polynomial in conventional form:
2 n
f ( x) a0  a1 x  a2 x    a x x
• Since n+1 data points are required to determine n+1
coefficients, simultaneous linear systems of equations
can be used to calculate “a”s.

23
2 n
f ( x0 ) a0  a1 x0  a x   a x
2 0 n 0
2 n
f ( x1 ) a0  a1 x1  a x   a x
2 1 n 1


2 n
f ( xn ) a0  a1 xn  a x   a x
2 n n n

Where “x”s are the knowns and “a”s are the unknowns.

24
Summary
• Three ways of formulating the unique
nth-order polynomial that fits n+1 points.
• Theoretically all the same.
• Practically:
– Newton’s most useful for sequential
calculation
– Lagrange often used when the order of the
polynomial is known a priori
– Standard form only used if there is a
specific interest in the coefficients.
References
• Chapra, S. & Canale, R (2021).
Numerical Methods for Engineers (8th Edition)
. London: McGraw-Hill.
– Chapter 18 (18.1 – 18.3)

• https://nm.mathforcollege.com
– Interpolation
• 05.03 NEWTON DIVIDED DIFFERENCE METHOD
• 05.04 LAGRANGE METHOD
Feedback

Feedback
Opportunity

If you want to provide any


feedback for this session, scan
the QRcode. If that doesn’t
work, copy or type the URL into
your browser. https://forms.office.com/r/BfSzFpKre0

You might also like