Polynomial Interpolation

Slides:



Advertisements
Similar presentations
Splines and Piecewise Interpolation
Advertisements

Part 2 Chapter 6 Roots: Open Methods
Part 2 Chapter 6 Roots: Open Methods
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Curve Fitting ~ Least Squares Regression Chapter.
Roots: Bracketing Methods
Part 5 Chapter 19 Numerical Differentiation PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The McGraw-Hill.
ES 240: Scientific and Engineering Computation. InterpolationPolynomial  Definition –a function f(x) that can be written as a finite series of power functions.
Part 3 Chapter 9 Gauss Elimination
Curve-Fitting Interpolation
Part 6 Chapter 22 Boundary-Value Problems PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The McGraw-Hill.
General Linear Least-Squares and Nonlinear Regression
Curve-Fitting Polynomial Interpolation
Part 4 Chapter 13 Linear Regression
Initial-Value Problems
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Martin Mendez UASLP Chapter 61 Unit II.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 22 CURVE FITTING Chapter 18 Function Interpolation and Approximation.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 181 Interpolation Chapter 18 Estimation of intermediate.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 23 CURVE FITTING Chapter 18 Function Interpolation and Approximation.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 181 Interpolation.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Interpolation Chapter 18.
Lagrange interpolation Gives the same results as Newton, but different method.
Chapter 6 Numerical Interpolation
Part 3 Chapter 8 Linear Algebraic Equations and Matrices PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 171 Least.
Linear Simultaneous Equations
Numerical Integration Formulas
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Curve Fitting ~ Least Squares Regression Chapter.
Curve Fitting and Interpolation: Lecture (I)
Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00.
Part 3 Chapter 11 Matrix Inverse and Condition PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The McGraw-Hill.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Applied Numerical Methods With MATLAB ® for Engineers.
Curve Fitting and Regression EEE 244. Descriptive Statistics in MATLAB MATLAB has several built-in commands to compute and display descriptive statistics.
Part 4 Chapter 17 Polynomial Interpolation PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The McGraw-Hill.
Polynomial Interpolation You will frequently have occasions to estimate intermediate values between precise data points. The function you use to interpolate.
Lecture Notes Dr. Rakhmad Arief Siregar Universiti Malaysia Perlis
Chapter 8 Curve Fitting.
Chapter 14 Curve Fitting : Polynomial Interpolation Gab Byung Chae.
Part 2 Chapter 5 Roots: Bracketing Methods PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The McGraw-Hill.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Roots of Equations ~ Open Methods Chapter 6 Credit:
Interpolation produces a function that matches the given data exactly. The function then can be utilized to approximate the data values at intermediate.
Part 3 Chapter 11 Matrix Inverse and Condition Part A All images copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Part 4 Chapter 16 Fourier Analysis PowerPoints organized by Prof. Steve Chapra, University All images copyright © The McGraw-Hill Companies, Inc. Permission.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 7 - Chapter 25.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 27.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 4 Chapter 15 General Least Squares and Non- Linear.
Principles of Extrapolation
Chapter 13 Objectives Familiarizing yourself with some basic descriptive statistics and the normal distribution. Knowing how to compute the slope and intercept.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Curve Fitting ~ Least Squares Regression.
Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00.
Part 3 Chapter 9 Gauss Elimination PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The McGraw-Hill Companies,
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 6 - Chapters 22 and 23.
Interpolation - Introduction
Part 3 Chapter 9 Gauss Elimination
Part 3 Chapter 12 Iterative Methods
Linear Algebraic Equations and Matrices
Polynomial Interpolation
Matrix Inverse and Condition
Interpolation Estimation of intermediate values between precise data points. The most common method is: Although there is one and only one nth-order.
Chapter 18.
Linear Algebraic Equations and Matrices
Boundary-Value Problems
Numerical Integration Formulas
Numerical Differentiation
Part 2 Chapter 6 Roots: Open Methods
Chapter 18.
Roundoff and Truncation Errors
General Linear Least-Squares and Nonlinear Regression
Splines and Piecewise Interpolation
Roundoff and Truncation Errors
Part 2 Chapter 6 Roots: Open Methods
Presentation transcript:

Polynomial Interpolation Part 4 Chapter 15 Polynomial Interpolation PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter Objectives Recognizing that evaluating polynomial coefficients with simultaneous equations is an ill-conditioned problem. Knowing how to evaluate polynomial coefficients and interpolate with MATLAB’s polyfit and polyval functions. Knowing how to perform an interpolation with Newton’s polynomial. Knowing how to perform an interpolation with a Lagrange polynomial. Knowing how to solve an inverse interpolation problem by recasting it as a roots problem. Appreciating the dangers of extrapolation. Recognizing that higher-order polynomials can manifest large oscillations.

Polynomial Interpolation You will frequently have occasions to estimate intermediate values between precise data points. The function you use to interpolate must pass through the actual data points - this makes interpolation more restrictive than fitting. The most common method for this purpose is polynomial interpolation, where an (n-1)th order polynomial is solved that passes through n data points:

Determining Coefficients Since polynomial interpolation provides as many basis functions as there are data points (n), the polynomial coefficients can be found exactly using linear algebra. MATLAB’s built in polyfit and polyval commands can also be used - all that is required is making sure the order of the fit for n data points is n-1.

Polynomial Interpolation Problems One problem that can occur with solving for the coefficients of a polynomial is that the system to be inverted is in the form: Matrices such as that on the left are known as Vandermonde matrices, and they are very ill-conditioned - meaning their solutions are very sensitive to round-off errors. The issue can be minimized by scaling and shifting the data.

Newton Interpolating Polynomials Another way to express a polynomial interpolation is to use Newton’s interpolating polynomial. The differences between a simple polynomial and Newton’s interpolating polynomial for first and second order interpolations are:

Newton Interpolating Polynomials (cont) The first-order Newton interpolating polynomial may be obtained from linear interpolation and similar triangles, as shown. The resulting formula based on known points x1 and x2 and the values of the dependent function at those points is:

Newton Interpolating Polynomials (cont) The second-order Newton interpolating polynomial introduces some curvature to the line connecting the points, but still goes through the first two points. The resulting formula based on known points x1, x2, and x3 and the values of the dependent function at those points is:

Newton Interpolating Polynomials (cont) In general, an (n-1)th Newton interpolating polynomial has all the terms of the (n-2)th polynomial plus one extra. The general formula is: where and the f[…] represent divided differences.

Divided Differences Divided difference are calculated as follows: Divided differences are calculated using divided difference of a smaller number of terms:

MATLAB Implementation

Lagrange Interpolating Polynomials Another method that uses shifted value to express an interpolating polynomial is the Lagrange interpolating polynomial. The differences between a simply polynomial and Lagrange interpolating polynomials for first and second order polynomials is: where the Li are weighting coefficients that are functions of x.

Lagrange Interpolating Polynomials (cont) The first-order Lagrange interpolating polynomial may be obtained from a weighted combination of two linear interpolations, as shown. The resulting formula based on known points x1 and x2 and the values of the dependent function at those points is:

Lagrange Interpolating Polynomials (cont) In general, the Lagrange polynomial interpolation for n points is: where Li is given by:

MATLAB Implementation

Inverse Interpolation Interpolation general means finding some value f(x) for some x that is between given independent data points. Sometimes, it will be useful to find the x for which f(x) is a certain value - this is inverse interpolation. Rather than finding an interpolation of x as a function of f(x), it may be useful to find an equation for f(x) as a function of x using interpolation and then solve the corresponding roots problem: f(x)-fdesired=0 for x.

Extrapolation Extrapolation is the process of estimating a value of f(x) that lies outside the range of the known base points x1, x2, …, xn. Extrapolation represents a step into the unknown, and extreme care should be exercised when extrapolating!

Extrapolation Hazards The following shows the results of extrapolating a seventh-order population data set:

Oscillations Higher-order polynomials can not only lead to round-off errors due to ill-conditioning, but can also introduce oscillations to an interpolation or fit where they should not be. In the figures below, the dashed line represents an function, the circles represent samples of the function, and the solid line represents the results of a polynomial interpolation: