Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
30 views21 pages

Interpolation

The document discusses various interpolation methods, including polynomial interpolation, Newton's and Lagrange polynomials, and spline interpolation. It emphasizes the importance of choosing the right method based on the number of data points and the desired accuracy, highlighting that smaller intervals yield better approximations. Additionally, it covers error estimation for Newton's polynomial and the advantages of using lower-order polynomials in spline interpolation to avoid issues with round-off errors and overshooting.

Uploaded by

ahnafhasan2183
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)
30 views21 pages

Interpolation

The document discusses various interpolation methods, including polynomial interpolation, Newton's and Lagrange polynomials, and spline interpolation. It emphasizes the importance of choosing the right method based on the number of data points and the desired accuracy, highlighting that smaller intervals yield better approximations. Additionally, it covers error estimation for Newton's polynomial and the advantages of using lower-order polynomials in spline interpolation to avoid issues with round-off errors and overshooting.

Uploaded by

ahnafhasan2183
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/ 21

CE 205

Numerical Methods

Sakib Hasnat
Lecturer, Department of Civil Engineering
[email protected]
INTERPOLATION
In order to estimate intermediate values between precise data points, the most common method is
polynomial interpolation.

The general formula for an nth order polynomial is-

For n+1 data points, there is one and only one polynomial of order n that passes through all the points

January 2024
INTERPOLATION
Two alternatives will be discusses that are well-suited for computer implementation:

• Newton
• Lagrange polynomials

Linear Interpolation

The simplest form of interpolation is to connect two data points with a straight line

The smaller the interval, the better the approximation of the finite divided difference estimation of
the first derivative

January 2024
INTERPOLATION

Smaller the interval, better the estimate

A continuous function is better approximated


by a straight line as the interval decreases

January 2024
INTERPOLATION
Quadratic interpolation

If three data points are available, a second-order polynomial can be used as a better approximate
than a straight line. A convenient form of the quadratic equation for this purpose is,

This is the same form as,

January 2024
INTERPOLATION
Quadratic interpolation

The values of the coefficients can be determined as,

The first two terms are equivalent to linear interpolation, only the last term introduces some curvature
into the formula.

The coefficient b2 is similar to the finite divided difference approximation of the second derivative

January 2024
INTERPOLATION
Quadratic interpolation

The curvature introduced by the quadratic formula


improves the interpolation compared with the results
obtained form linear interpolation

January 2024
INTERPOLATION
General form of Newton’s Interpolating Polynomials

The generalized nth order polynomial fit to n+1 data points can be written as,

The following equations can be used to evaluate the coefficients,

The bracketed function evaluations f[] are finite divided differences

January 2024
INTERPOLATION
General form of Newton’s Interpolating Polynomials

First finite divided difference,

Second finite divided difference,

nth finite divided difference,

The coefficients b0 through bn can be evaluated by using the finite divided differences

January 2024
INTERPOLATION
General form of Newton’s Interpolating Polynomials

Recursive nature of the finite divided differences

January 2024
INTERPOLATION
Error estimation for Newton’s Polynomial

The error estimate for the nth order polynomial is equivalent to the difference between the (n+1)th
order and the nth order prediction,

Rn=fn+1(x) – fn(x)

This is also the increment added to the nth order case to create the (n+1)th order case, which is
interpreted as an estimate of the nth order error.

fn+1(x) = fn(x) + Rn

January 2024
INTERPOLATION
Error estimation for Newton’s Polynomial

• The error estimate is a future estimate minus a present one


• So the error estimate is not employed as a stopping
criterion
• The order of the chosen initial estimates should be closer
and spaced on either side of the unknown for better
convergence.

January 2024
INTERPOLATION
Lagrange Interpolating Polynomials

The Lagrange interpolating polynomial is simple a reformulation of the Newton polynomial that
avoids the computation of divided differences.

For the first order case of Newton’s divided differences,

Substituting into the first-order approximation for Newton’s polynomial,

January 2024
INTERPOLATION
Lagrange Interpolating Polynomials

The Lagrange interpolating polynomial is simple a reformulation of the Newton polynomial that
avoids the computation of divided differences.

Generalized form of Lagrange interpolating polynomials,

January 2024
INTERPOLATION
Lagrange Interpolating Polynomials

The Lagrange interpolating polynomial is simple a reformulation of the Newton polynomial that
avoids the computation of divided differences.

Generalized form of Lagrange interpolating polynomials,

January 2024
INTERPOLATION
Lagrange Interpolating Polynomials

Order of a polynomial

January 2024
INTERPOLATION
Newton’s Interpolating Polynomials [equally spaced data]

For equally spaced data

The second forward divided difference can be expressed as,

January 2024
INTERPOLATION
Newton’s Interpolating Polynomials [equally spaced data]

Newton’s interpolating polynomials for the case of equispaced data,

January 2024
INTERPOLATION
Newton’s Interpolating Polynomials [equally spaced data]

The formula can be simplified further,

January 2024
INTERPOLATION
Spline Interpolation

• (n+1) data points are used to perfectly fit nth order polynomials.
• These functions can lead to erroneous results due to round-off error and overshoot.
• An alternative approach is to apply lower-order polynomials to subsets of data points.
• Can be suitable in case of local, abrupt change along the region of interest.

January 2024
INTERPOLATION
Spline Interpolation

Linear splines:

• Not smooth
• First derivative of the function is
discontinuous
• Higher-order polynomial splines
ensure smoothness by equating
derivatives at these points

January 2024

You might also like