Polynomial Interpolation You will frequently have occasions to estimate intermediate values between precise data points. The function you use to interpolate.

Slides:



Advertisements
Similar presentations
Splines and Piecewise Interpolation
Advertisements

Numerical Methods.  Polynomial interpolation involves finding a polynomial of order n that passes through the n+1 points.  Several methods to obtain.
Computers in Civil Engineering 53:081 Spring 2003 Lecture #14 Interpolation.
Interpolation A method of constructing a function that crosses through a discrete set of known data points. .
CE33500 – Computational Methods in Civil Engineering Differentiation Provided by : Shahab Afshari
MATH 685/ CSI 700/ OR 682 Lecture Notes
Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00.
Chapter 18 Interpolation The Islamic University of Gaza
1 Chapter 4 Interpolation and Approximation Lagrange Interpolation The basic interpolation problem can be posed in one of two ways: The basic interpolation.
1 Curve-Fitting Spline Interpolation. 2 Curve Fitting Regression Linear Regression Polynomial Regression Multiple Linear Regression Non-linear Regression.
CITS2401 Computer Analysis & Visualisation
Curve Fitting: Splines
Computational Methods in Physics PHYS 3437
ES 240: Scientific and Engineering Computation. InterpolationPolynomial  Definition –a function f(x) that can be written as a finite series of power functions.
KFUPM SE301: Numerical Methods Topic 5: Interpolation Lectures 20-22:
Curve-Fitting Interpolation
Chapter 1 Introduction The solutions of engineering problems can be obtained using analytical methods or numerical methods. Analytical differentiation.
Engineering Computation Curve Fitting: Interpolation 1
Curve-Fitting Polynomial Interpolation
Interpolation Used to estimate values between data points difference from regression - goes through data points no error in data points.
Polynomial Interpolation
Curve Fitting and Interpolation: Lecture (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.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 24 Regression Analysis-Chapter 17.
ECIV 301 Programming & Graphics Numerical Methods for Engineers REVIEW II.
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.
Chapter 6 Numerical Interpolation
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 21 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 171 Least.
CMPS1371 Introduction to Computing for Engineers NUMERICAL METHODS.
Simpson Rule For Integration.
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.
1 Interpolation. 2 What is Interpolation ? Given (x 0,y 0 ), (x 1,y 1 ), …… (x n,y n ), find the value of ‘y’ at a.
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.
Today’s class Spline Interpolation Quadratic Spline Cubic Spline Fourier Approximation Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 1.
Lecture Notes Dr. Rakhmad Arief Siregar Universiti Malaysia Perlis
Chapter 8 Curve Fitting.
Chapter 14 Curve Fitting : Polynomial Interpolation Gab Byung Chae.
Computers in Civil Engineering 53:081 Spring 2003 Lecture #15 Spline Interpolation.
KFUPM SE301: Numerical Methods Topic 5: Interpolation Lectures 20-22:
EE3561_Unit 5(c)AL-DHAIFALLAH14361 EE 3561 : Computational Methods Unit 5 : Interpolation Dr. Mujahed AlDhaifallah (Term 351) Read Chapter 18, Sections.
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.
Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00.
By: Mark Coose Joetta Swift Micah Weiss. What Problems Can Interpolation Solve? Given a table of values, find a simple function that passes through the.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 4 Chapter 17 and 18 Interpolation.
1 Chapter 4 Interpolation and Approximation Lagrange Interpolation The basic interpolation problem can be posed in one of two ways: The basic interpolation.
Interpolation - Introduction
Lecture 29: Modeling Data. Data Modeling Interpolate between data points, using either linear or cubic spline models Model a set of data points as a polynomial.
1 Approximating functions, polynomial interpolation (Lagrange and Newton’s divided differences) formulas, error approximations.
Computational Methods CMSC/AMSC/MAPL 460 Polynomial Interpolation Ramani Duraiswami, Dept. of Computer Science.
EEE 244-7: Curve Fitting.
Polynomial Interpolation
Interpolation.
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.
Chapter 15 Curve Fitting : Splines
Chapter 18.
INTERPOLATION Prof. Samuel Okolie, Prof. Yinka Adekunle & Dr
Today’s class Multiple Variable Linear Regression
Interpolasi Pertemuan - 7 Mata Kuliah : Analisis Numerik
Splines and Piecewise Interpolation
SKTN 2393 Numerical Methods for Nuclear Engineers
Presentation transcript:

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.

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 x 1 and x 2 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 x 1, x 2, and x 3 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:

Example Approximate the function with a third order polynomial through x values 1,4,5,6.

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 a function, the circles represent samples of the function, and the solid line represents the results of a polynomial interpolation:

Introduction to Splines An alternative approach to using a single (n-1) th order polynomial to interpolate between n points is to apply lower-order polynomials in a piecewise fashion to subsets of data points. These connecting polynomials are called spline functions. Splines minimize oscillations and reduce round-off error due to their lower-order nature.

Spline Development Spline function (s i (x))coefficients are calculated for each interval of a data set. The number of data points (f i ) used for each spline function depends on the order of the spline function.

Cubic Splines While data of a particular size presents many options for the order of spline functions, cubic splines are preferred because they provide the simplest representation that exhibits the desired appearance of smoothness. –Linear splines have discontinuous first derivatives –Quadratic splines have discontinuous second derivatives and require setting the second derivative at some point to a pre-determined value *but* – Quartic or higher-order splines tend to exhibit the instabilities inherent in higher order polynomials (ill- conditioning or oscillations)

Piecewise Interpolation in MATLAB MATLAB has several built-in functions to implement piecewise interpolation. The first is spline: yy=spline(x, y, xx) This performs cubic spline interpolation. If y contains two more values than x has entries, then the first and last value in y are used as the derivatives at the end points (i.e. clamped)

Example Generate data: x = linspace(-1, 1, 9); y = 1./(1+25*x.^2); Calculate 100 model points and determine a cubic spline interpolation xx = linspace(-1, 1); yy = spline(x, y, xx); Calculate actual function values at model points and data points, the 9-point interpolation (solid), and the actual function (dashed), yr = 1./(1+25*xx.^2) plot(x, y, ‘o’, xx, yy, ‘-’, xx, yr, ‘--’)

Clamped Example Generate data w/ first derivative information: x = linspace(-1, 1, 9); y = 1./(1+25*x.^2); yc = [1 y -4] Calculate 100 model points and determine a cubic spline interpolation xx = linspace(-1, 1); yyc = spline(x, yc, xx); Calculate actual function values at model points and data points, the 9-point clamped interpolation (solid), and the actual function (dashed), yr = 1./(1+25*xx.^2) plot(x, y, ‘o’, xx, yyc, ‘-’, xx, yr, ‘--’)