MATH 685/ CSI 700/ OR 682 Lecture Notes

Slides:



Advertisements
Similar presentations
Splines and Piecewise Interpolation
Advertisements

Numerical Integration
Mark Trew CT Halfway Down Halfway down the stairs Is a stair Where I sit. There isn't any Other stair Quite like It. I'm not at the bottom, I'm.
Lecture Notes #11 Curves and Surfaces II
Lecture 10 Curves and Surfaces I
Numeriska beräkningar i Naturvetenskap och Teknik Today’s topic: Approximations Least square method Interpolations Fit of polynomials Splines.
Numerical Methods.  Polynomial interpolation involves finding a polynomial of order n that passes through the n+1 points.  Several methods to obtain.
Interpolation A method of constructing a function that crosses through a discrete set of known data points. .
Asymptotic error expansion Example 1: Numerical differentiation –Truncation error via Taylor expansion.
CS 445/645 Fall 2001 Hermite and Bézier Splines. Specifying Curves Control Points –A set of points that influence the curve’s shape Knots –Control points.
Data mining and statistical learning - lecture 6
Selected from presentations by Jim Ramsay, McGill University, Hongliang Fei, and Brian Quanz Basis Basics.
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.
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.
Experimental Modeling
Curve-Fitting Interpolation
1cs426-winter-2008 Notes  Ian Mitchell is running a MATLAB tutorial, Tuesday January 15, 5pm-7pm, DMP 110 We won’t be directly using MATLAB in this course,
Curve-Fitting Regression
Engineering Computation Curve Fitting: Interpolation 1
Curve-Fitting Polynomial Interpolation
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.
Chapter 6 Numerical Interpolation
Human Growth: From data to functions. Challenges to measuring growth We need repeated and regular access to subjects for up to 20 years. We need repeated.
CpE- 310B Engineering Computation and Simulation Dr. Manal Al-Bzoor
Interpolation. Interpolation is important concept in numerical analysis. Quite often functions may not be available explicitly but only the values of.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 4 Curve Fitting.
V. Space Curves Types of curves Explicit Implicit Parametric.
Lecture 22 - Exam 2 Review CVEN 302 July 29, 2002.
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.
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.
Chapter 8 Curve Fitting.
Quadratic Surfaces. SPLINE REPRESENTATIONS a spline is a flexible strip used to produce a smooth curve through a designated set of points. We.
Curve-Fitting Regression
1. Interpolating polynomials Polynomial of degree n,, is a linear combination of Definitions: (interval, continuous function, abscissas, and polynomial)
6. Introduction to Spectral method. Finite difference method – approximate a function locally using lower order interpolating polynomials. Spectral method.
Computers in Civil Engineering 53:081 Spring 2003 Lecture #15 Spline Interpolation.
Lecture 16 - Approximation Methods CVEN 302 July 15, 2002.
Jump to first page Chapter 3 Splines Definition (3.1) : Given a function f defined on [a, b] and a set of numbers, a = x 0 < x 1 < x 2 < ……. < x n = b,
Introduction to Numerical Analysis I MATH/CMPSC 455 Splines.
1 EEE 431 Computational Methods in Electrodynamics Lecture 18 By Dr. Rasime Uyguroglu
Spline Interpolation A Primer on the Basics by Don Allen.
Principles of Extrapolation
MA2213 Lecture 2 Interpolation.
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.
1 Chapter 4 Interpolation and Approximation Lagrange Interpolation The basic interpolation problem can be posed in one of two ways: The basic interpolation.
Curves University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2013 Tamara Munzner.
Runge Kutta schemes Taylor series method Numeric solutions of ordinary differential equations.
Introduction to Parametric Curve and Surface Modeling.
Interpolation - Introduction
Computational Methods CMSC/AMSC/MAPL 460 Polynomial Interpolation Ramani Duraiswami, Dept. of Computer Science.
Curve-Fitting Spline Interpolation
Interpolation Methods
Interpolation.
© University of Wisconsin, CS559 Spring 2004
Spline Interpolation Class XVII.
POLYNOMIAL INTERPOLATION
Interpolation Methods
MATH 174: Numerical Analysis I
ANSWER THE FOLLOWING BRIEFLY BUT COMPREHENSIVELY.
SKTN 2393 Numerical Methods for Nuclear Engineers
Introduction to Parametric Curve and Surface Modeling
SKTN 2393 Numerical Methods for Nuclear Engineers
Curve Fitting Filling in the gaps.
Presentation transcript:

MATH 685/ CSI 700/ OR 682 Lecture Notes Math 685/CSI 700 Spring 08 MATH 685/ CSI 700/ OR 682 Lecture Notes Lecture 5. Interpolation. George Mason University, Department of Mathematical Sciences

Interpolation Math 685/CSI 700 Spring 08 George Mason University, Department of Mathematical Sciences

Math 685/CSI 700 Spring 08 Uses of interpolation Plotting smooth curve through discrete data points Reading between lines of table Differentiating or integrating tabular data Quick and easy evaluation of mathematical function Replacing complicated function by simple one Comparing to approximation: By definition, interpolating function fits given data points exactly Interpolation is inappropriate if data points subject to significant errors It is usually preferable to smooth noisy data, for example by least squares approximation Approximation is also more appropriate for special function libraries George Mason University, Department of Mathematical Sciences

Issues in interpolation Math 685/CSI 700 Spring 08 Issues in interpolation Questions: Arbitrarily many functions interpolate given set of data points What form should interpolating function have? How should interpolant behave between data points? Should interpolant inherit properties of data, such as monotonicity, convexity, or periodicity? Are parameters that define interpolating function meaningful? If function and data are plotted, should results be visually pleasing? Choice of function for interpolation based on how easy interpolating function is to work with, i.e. determining its parameters evaluating interpolant differentiating or integrating interpolant How well properties of interpolant match properties of data to be fit (smoothness, monotonicity, convexity, periodicity, etc.) George Mason University, Department of Mathematical Sciences

Basis functions Math 685/CSI 700 Spring 08 George Mason University, Department of Mathematical Sciences

Existence/uniqueness Math 685/CSI 700 Spring 08 Existence/uniqueness Existence and uniqueness of interpolant depend on number of data points m and number of basis functions n If m > n, interpolant might or might not exist If m < n, interpolant is not unique If m = n, then basis matrix A is nonsingular provided data points ti are distinct, so data can be fit exactly Sensitivity of parameters x to perturbations in data depends on cond(A), which depends in turn on choice of basis functions George Mason University, Department of Mathematical Sciences

Choices of basis functions Math 685/CSI 700 Spring 08 Choices of basis functions Families of functions commonly used for interpolation include Polynomials Piecewise polynomials Trigonometric functions Exponential functions Rational functions For now we will focus on interpolation by polynomials and piecewise polynomials Then we will consider trigonometric interpolation George Mason University, Department of Mathematical Sciences

Polynomial interpolation Math 685/CSI 700 Spring 08 Polynomial interpolation Simplest and most common type of interpolation uses polynomials Unique polynomial of degree at most n − 1 passes through n data points (ti, yi), i = 1, . . . , n, where ti are distinct George Mason University, Department of Mathematical Sciences

Example O(n3) operations to solve linear system Math 685/CSI 700 Spring 08 Example O(n3) operations to solve linear system George Mason University, Department of Mathematical Sciences

Math 685/CSI 700 Spring 08 Conditioning For monomial basis, matrix A is increasingly ill-conditioned as degree increases Ill-conditioning does not prevent fitting data points well, since residual for linear system solution will be small But it does mean that values of coefficients are poorly determined Both conditioning of linear system and amount of computational work required to solve it can be improved by using different basis Change of basis still gives same interpolating polynomial for given data, but representation of polynomial will be different Still not well-conditioned, Looking for better alternative George Mason University, Department of Mathematical Sciences

Polynomial evaluation Math 685/CSI 700 Spring 08 Polynomial evaluation George Mason University, Department of Mathematical Sciences

Lagrange interpolation Math 685/CSI 700 Spring 08 Lagrange interpolation Easy to determine, but expensive to evaluate, integrate and differentiate comparing to monomials George Mason University, Department of Mathematical Sciences

Example Math 685/CSI 700 Spring 08 George Mason University, Department of Mathematical Sciences

Newton interpolation Forward-substitution O(n2) Math 685/CSI 700 Spring 08 Newton interpolation Forward-substitution O(n2) Nested evaluation scheme Better balance between cost of computing interpolant and evaluating it George Mason University, Department of Mathematical Sciences

Example Math 685/CSI 700 Spring 08 George Mason University, Department of Mathematical Sciences

Divided differences Math 685/CSI 700 Spring 08 George Mason University, Department of Mathematical Sciences

Orthogonal polynomials Math 685/CSI 700 Spring 08 Orthogonal polynomials George Mason University, Department of Mathematical Sciences

Choices for orthogonal basis Math 685/CSI 700 Spring 08 Choices for orthogonal basis Orthogonality => natural for least squares approximation Also useful for generating Gaussian quadrature George Mason University, Department of Mathematical Sciences

Chebyshev polynomials Math 685/CSI 700 Spring 08 Chebyshev polynomials George Mason University, Department of Mathematical Sciences

Math 685/CSI 700 Spring 08 George Mason University, Department of Mathematical Sciences

Runge example Math 685/CSI 700 Spring 08 George Mason University, Department of Mathematical Sciences

Math 685/CSI 700 Spring 08 Convergence issues Polynomial interpolating continuous function may not converge to function as number of data points and polynomial degree increases Equally spaced interpolation points often yield unsatisfactory results near ends of interval If points are bunched near ends of interval, more satisfactory results are likely to be obtained with polynomial interpolation Use of Chebyshev points distributes error evenly and yields convergence throughout interval for any sufficiently smooth function Interpolating polynomials of high degree are expensive to determine and evaluate In some bases, coefficients of polynomial may be poorly determined due to ill-conditioning of linear system to be solved High-degree polynomial necessarily has lots of “wiggles,” which may bear no relation to data to be fit Polynomial passes through required data points, but it may oscillate wildly between data points George Mason University, Department of Mathematical Sciences

Piecewise polynomials Math 685/CSI 700 Spring 08 Piecewise polynomials Fitting single polynomial to large number of data points is likely to yield unsatisfactory oscillating behavior in interpolant Piecewise polynomials provide alternative to practical and theoretical difficulties with high-degree polynomial interpolation. Main advantage of piecewise polynomial interpolation is that large number of data points can be fit with low-degree polynomials In piecewise interpolation of given data points (ti, yi), different function is used in each subinterval [ti, ti+1] Abscissas ti are called knots or breakpoints, at which interpolant changes from one function to another Simplest example is piecewise linear interpolation, in which successive pairs of data points are connected by straight lines Although piecewise interpolation eliminates excessive oscillation and nonconvergence, it appears to sacrifice smoothness of interpolating function We have many degrees of freedom in choosing piecewise polynomial interpolant, however, which can be exploited to obtain smooth interpolating function despite its piecewise nature George Mason University, Department of Mathematical Sciences

Hermite vs. cubic spline Math 685/CSI 700 Spring 08 Hermite vs. cubic spline Hermite cubic interpolant is piecewise cubic polynomial interpolant with continuous first derivative Piecewise cubic polynomial with n knots has 4(n − 1) parameters to be determined Requiring that it interpolate given data gives 2(n − 1) equations Requiring that it have one continuous derivative gives n − 2 additional equations, or total of 3n − 4, which still leaves n free parameters Thus, Hermite cubic interpolant is not unique, and remaining free parameters can be chosen so that result satisfies additional constraints Spline is piecewise polynomial of degree k that is k − 1 times continuously differentiable For example, linear spline is of degree 1 and has 0 continuous derivatives, i.e., it is continuous, but not smooth, and could be described as “broken line” Cubic spline is piecewise cubic polynomial that is twice continuously differentiable As with Hermite cubic, interpolating given data and requiring one continuous derivative imposes 3n − 4 constraints on cubic spline Requiring continuous second derivative imposes n − 2 additional constraints, leaving 2 remaining free parameters George Mason University, Department of Mathematical Sciences

Spline example Math 685/CSI 700 Spring 08 George Mason University, Department of Mathematical Sciences

Example Math 685/CSI 700 Spring 08 George Mason University, Department of Mathematical Sciences

Example Math 685/CSI 700 Spring 08 George Mason University, Department of Mathematical Sciences

Math 685/CSI 700 Spring 08 Hermite vs. spline Choice between Hermite cubic and spline interpolation depends on data to be fit and on purpose for doing interpolation If smoothness is of paramount importance, then spline interpolation may be most appropriate But Hermite cubic interpolant may have more pleasing visual appearance and allows flexibility to preserve monotonicity if original data are monotonic In any case, it is advisable to plot interpolant and data to help assess how well interpolating function captures behavior of original data George Mason University, Department of Mathematical Sciences