Interpolation Methods

Slides:



Advertisements
Similar presentations
Splines and Piecewise Interpolation
Advertisements

Polynomial Approximation PSCI 702 October 05, 2005.
Lecture Notes #11 Curves and Surfaces II
Lecture 10 Curves and Surfaces I
Numerical Methods.  Polynomial interpolation involves finding a polynomial of order n that passes through the n+1 points.  Several methods to obtain.
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
Computational Methods in Physics PHYS 3437
EARS1160 – Numerical Methods notes by G. Houseman
Chapter 3, Interpolation and Extrapolation. Interpolation & Extrapolation (x i,y i ) Find an analytic function f(x) that passes through given N points.
ES 240: Scientific and Engineering Computation. InterpolationPolynomial  Definition –a function f(x) that can be written as a finite series of power functions.
數值方法 2008, Applied Mathematics NDHU 1 Spline interpolation.
Curve-Fitting Interpolation
MANE 4240 & CIVL 4240 Introduction to Finite Elements Numerical Integration in 1D Prof. Suvranu De.
Engineering Computation Curve Fitting: Interpolation 1
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.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Interpolation Chapter 18.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 21 CURVE FITTING Chapter 18 Function Interpolation and Approximation.
CpE- 310B Engineering Computation and Simulation Dr. Manal Al-Bzoor
Curve Modeling Bézier Curves
Interpolation. Interpolation is important concept in numerical analysis. Quite often functions may not be available explicitly but only the values of.
Interactive Graphics Lecture 9: Slide 1 Interactive Graphics Lecture 9: Introduction to Spline Curves.
Vector Computer Graphic. Vector entities Line Circle, Ellipse, arc,… Curves: Spline, Bezier’s curve, … … Areas Solids Models.
CISE301_Topic41 CISE301: Numerical Methods Topic 4: Least Squares Curve Fitting Lectures 18-19: KFUPM Read Chapter 17 of the textbook.
Section Functions Function: A function is a correspondence between a first set, called the domain and a second set called the range such that each.
Today’s class Spline Interpolation Quadratic Spline Cubic Spline Fourier Approximation Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 1.
Polynomial Interpolation You will frequently have occasions to estimate intermediate values between precise data points. The function you use to interpolate.
Advanced Topics- Polynomials
Splines IV – B-spline Curves based on: Michael Gleicher: Curves, chapter 15 in Fundamentals of Computer Graphics, 3 rd ed. (Shirley & Marschner) Slides.
Computers in Civil Engineering 53:081 Spring 2003 Lecture #15 Spline Interpolation.
Computer Programming (TKK-2144) 13/14 Semester 1 Instructor: Rama Oktavian Office Hr.: M.13-15, W Th , F
Mohiuddin Ahmad SUNG-BONG JANG Interpolation II (8.4 SPLINE INTERPOLATION) (8.5 MATLAB’s INTERPOLATION Functions)
Interactive Graphics Lecture 10: Slide 1 Interactive Computer Graphics Lecture 10 Introduction to Surface Construction.
Spline Interpolation A Primer on the Basics by Don Allen.
Principles of Extrapolation
Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00.
Introduction to Parametric Curve and Surface Modeling.
Interpolation - Introduction
Computational Methods CMSC/AMSC/MAPL 460 Polynomial Interpolation Ramani Duraiswami, Dept. of Computer Science.
MTH1150 Rules of Differentiation
CS5500 Computer Graphics May 11, 2006
Chapter 10-2: Curves.
Curve-Fitting Spline 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 3, Interpolation and Extrapolation
Chapter 15 Curve Fitting : Splines
Chapter 18.
INTERPOLATION Prof. Samuel Okolie, Prof. Yinka Adekunle & Dr
© University of Wisconsin, CS559 Spring 2004
Today’s class Multiple Variable Linear Regression
MATH 2140 Numerical Methods
Spline Interpolation Class XVII.
Introduction to Parent Functions
Splines and Piecewise Interpolation
Interpolation Methods
MATH 174: Numerical Analysis I
Introduction to Parent Functions
Splines There are cases where polynomial interpolation is bad
Introduction to Parametric Curve and Surface Modeling
SKTN 2393 Numerical Methods for Nuclear Engineers
Introduction to Parent Functions
Pre-Calculus 1.2 Kinds of Functions
Theory of Approximation: Interpolation
Presentation transcript:

Interpolation Methods Fish 559; Lecture 21 a

What is Interpolation? There is a function f(x) that is very “expensive” (or difficult) to evaluate. We wish to compute f(x) for many values of x as “cheaply” as possible. We have data points (x,y=g(x)) but do not know the function g. We wish to compute g(x) for values of x other than those for which the data points are available.

Consider the “Runge” Function Given these seven data points, how do we determine the values of y for other values for x?

Linear Interpolation-I Approximate f(x) between xi and xi+1 by a straight line connecting xi and xi+1, i.e.: or

Linear Interpolation-II Linear interpolation is very accurate in this case, but it requires knowing between which values of xi the x we are interested in lies

Linear Interpolation-III R includes the function approx which can be used to perform linear interpolation: approx(x, y, xout) x,y – the vector of (x,y) pairs on which to base the calculations. xout – a vector of values of x for which values of g(x) are required.

Polynomial Interpolation-I There are many ways to approximate a function using a polynomial. The simplest is to approximate the function by: Note that: this approximation is exact for x=x1, x2, x3, etc.; and a single equation is used to approximate the entire function.

Polynomial Interpolation-II The polynomial passes though all seven points but….

Polynomial Interpolation-III A better approximation can be obtained in this case by applying polynomial interpolation with N=3 (i.e. quadratic functions)

Rational Interpolation-I Rather than approximating a function by a simple polynomial, we can approximate it by the ratio of polynomials, i.e.: This approach can deal with poles in the function to be approximated (unfortunately even when they are not there).

Rational Interpolation-II Rational approximation performs better than simple polynomial interpolation for the Runge function (as expected?)

More Examples

Splines-I Cubic splines are piecewise cubic polynomials that approximate a function such that: The zeroth, first and second derivatives are continuous; the approximating function matches the points on which it is based; and the second derivatives of the approximating function match the second derivatives of the function.

Splines II Define a set of points (called “knots”) – these are the points for which data are available: The cubic spline is defined by the equation: This equation has four parameters for each pair of knots. The values for these parameters are defined from the function values at the knots and the (numerical) second derivatives at the knots.

Splines III The cubic spline is able to satisfactorily mimic the underlying shape almost perfectly y3 <- spline(x,y) lines(y3,col=19,lwd=3)

Splines -IV Using a Spline for interpolation requires that the values for the parameters be computed. In order to predict the value of y for some x, it is necessary to apply a search algorithm (e.g. bisection) to find the knots between which x lies.

spline(x, y, n, periodic, xmin, xmax ) Splines V R includes the function spline: spline(x, y, n, periodic, xmin, xmax ) Arguments: x, y – the data (required); n – number of output points; periodic – is the function periodic? xmin / xmax – range to predict over. Output: List with components x and y that provide the results of the cubic spline fitting.

Spline vs linear interpolation based on 8, 12 and 16 points Splines VI Spline vs linear interpolation based on 8, 12 and 16 points

Interpolation and Extrapolation-I Polynomial and rational approximation are methods for interpolation. In principle, they can be used to extrapolate beyond the range of the xs for which data are available. This should, however, be done with considerable caution. Consider the following selectivity ogive.

Interpolation and Extrapolation-II 3-point polynomial interpolation. Extrapolation beyond age=0 and age=25 is based on the results for the first and last intervals