Lecture Notes 2: Polynomial Interpolation CPSC 303: Numerical Approximation and Discretization Ian M. Mitchell
[email protected] http://www.cs.ubc.ca/~mitchell University of British Columbia Department of Computer Science Winter Term Two 2012{2013 Copyright 2012{2013 by Ian M. Mitchell This work is made available under the terms of the Creative Commons Attribution 2.5 Canada license http://creativecommons.org/licenses/by/2.5/ca/ Outline • Background • Problem statement and motivation • Formulation: The linear system and its conditioning • Polynomial bases • Monomial • Lagrange • Newton • Uniqueness of polynomial interpolant • Divided differences • Divided difference tables and the Newton basis interpolant • Divided difference connection to derivatives • Osculating interpolation: interpolating derivatives • Error analysis for polynomial interpolation • Reducing the error using the Chebyshev points as abscissae CPSC 303 Notes 2 Ian M. Mitchell | UBC Computer Science 2/ 53 Interpolation Motivation n We are given a collection of data samples f(xi; yi)gi=0 n • The fxigi=0 are called the abscissae (singular: abscissa), n the fyigi=0 are called the data values • Want to find a function p(x) which can be used to estimate y(x) for x 6= xi • Why? We often get discrete data from sensors or computation, but we want information as if the function were not discretely sampled • If possible, p(x) should be inexpensive to evaluate for a given x CPSC 303 Notes 2 Ian M. Mitchell | UBC Computer Science 3/ 53 Interpolation Formulation There are lots of ways to define a function p(x) to approximate n f(xi; yi)gi=0 • Interpolation means p(xi) = yi (and we will only evaluate p(x) for mini xi ≤ x ≤ maxi xi) • Most interpolants (and even general data fitting) is done with a linear combination of (usually nonlinear) basis functions fφj(x)g n X p(x) = pn(x) = cjφj(x) j=0 where cj are the interpolation coefficients or interpolation weights CPSC 303 Notes 2 Ian M.