Numerical Methods I: Interpolation (cont ed)

Similar documents
Numerical Methods I: Polynomial Interpolation

Cubic Splines; Bézier Curves

Numerical Methods I: Numerical Integration/Quadrature

Outline. 1 Interpolation. 2 Polynomial Interpolation. 3 Piecewise Polynomial Interpolation

Lagrange Interpolation and Neville s Algorithm. Ron Goldman Department of Computer Science Rice University

3.1 Interpolation and the Lagrange Polynomial

Arsène Pérard-Gayot (Slides by Piotr Danilewski)

Exam 2. Average: 85.6 Median: 87.0 Maximum: Minimum: 55.0 Standard Deviation: Numerical Methods Fall 2011 Lecture 20

University of Houston, Department of Mathematics Numerical Analysis, Fall 2005

Interpolation. Chapter Interpolation. 7.2 Existence, Uniqueness and conditioning

Global polynomial interpolants suffer from the Runge Phenomenon if the data sites (nodes) are not chosen correctly.

Lecture 10 Polynomial interpolation

Scientific Computing: An Introductory Survey

Polynomials. p n (x) = a n x n + a n 1 x n 1 + a 1 x + a 0, where

Numerical Methods I Orthogonal Polynomials

Cubic Splines MATH 375. J. Robert Buchanan. Fall Department of Mathematics. J. Robert Buchanan Cubic Splines

2. Interpolation. Closing the Gaps of Discretization...

Piecewise Polynomial Interpolation

Piecewise Polynomial Interpolation

Scientific Computing

(0, 0), (1, ), (2, ), (3, ), (4, ), (5, ), (6, ).

Lectures 9-10: Polynomial and piecewise polynomial interpolation

INTERPOLATION. and y i = cos x i, i = 0, 1, 2 This gives us the three points. Now find a quadratic polynomial. p(x) = a 0 + a 1 x + a 2 x 2.

Numerical Methods I: Eigenvalues and eigenvectors

Chapter 1 Numerical approximation of data : interpolation, least squares method

M2R IVR, October 12th Mathematical tools 1 - Session 2

1 Review of Interpolation using Cubic Splines

Interpolation. Escuela de Ingeniería Informática de Oviedo. (Dpto. de Matemáticas-UniOvi) Numerical Computation Interpolation 1 / 34

Applied Math 205. Full office hour schedule:

Function Approximation

Applied Numerical Analysis Quiz #2

Chapter 4: Interpolation and Approximation. October 28, 2005

Curve Fitting and Interpolation

5.1 introduction problem : Given a function f(x), find a polynomial approximation p n (x).

Interpolation and extrapolation

Interpolation Theory

November 20, Interpolation, Extrapolation & Polynomial Approximation

We consider the problem of finding a polynomial that interpolates a given set of values:

A THEORETICAL INTRODUCTION TO NUMERICAL ANALYSIS

Math 365 Homework 5 Due April 6, 2018 Grady Wright

Computational Methods CMSC/AMSC/MAPL 460. Fourier transform

Chordal cubic spline interpolation is fourth order accurate

Interpolation. 1. Judd, K. Numerical Methods in Economics, Cambridge: MIT Press. Chapter

Computational Physics

CSE 548: Analysis of Algorithms. Lecture 4 ( Divide-and-Conquer Algorithms: Polynomial Multiplication )

CONTROL POLYGONS FOR CUBIC CURVES

Function approximation

Convergence for periodic Fourier series

Some notes on Chapter 8: Polynomial and Piecewise-polynomial Interpolation

Lecture Note 3: Interpolation and Polynomial Approximation. Xiaoqun Zhang Shanghai Jiao Tong University

UNIT-II INTERPOLATION & APPROXIMATION

Solving Fredholm integral equations with application of the four Chebyshev polynomials

Polynomial Interpolation with n + 1 nodes

Application of modified Leja sequences to polynomial interpolation

Interpolation and polynomial approximation Interpolation

Chapter 1 Divide and Conquer Polynomial Multiplication Algorithm Theory WS 2015/16 Fabian Kuhn

q-series Michael Gri for the partition function, he developed the basic idea of the q-exponential. From

Outline. 1 Numerical Integration. 2 Numerical Differentiation. 3 Richardson Extrapolation

Geometric Interpolation by Planar Cubic Polynomials

Numerical Analysis: Approximation of Functions

Interpolation and polynomial approximation Interpolation

CHAPTER 4. Interpolation

Math 365 Monday 3/25/19. 1 x n n 1. 1 x = X. a k x k (Considered formally, i.e. without consideration of convergence.)

Examination paper for TMA4215 Numerical Mathematics

Interpolation Atkinson Chapter 3, Stoer & Bulirsch Chapter 2, Dahlquist & Bjork Chapter 4 Topics marked with are not on the exam

MAT300/500 Programming Project Spring 2019

CS412: Introduction to Numerical Methods

CHAPTER 8. Approximation Theory

Examples of metric spaces. Uniform Convergence

Numerical Methods I: Orthogonalization and Newton s method

Lecture Note 3: Polynomial Interpolation. Xiaoqun Zhang Shanghai Jiao Tong University

Improved Lebesgue constants on the triangle

MA1023-Methods of Mathematics-15S2 Tutorial 1

A first order divided difference

Polynomial Interpolation

n 1 f n 1 c 1 n+1 = c 1 n $ c 1 n 1. After taking logs, this becomes

Outline. 1 Boundary Value Problems. 2 Numerical Methods for BVPs. Boundary Value Problems Numerical Methods for BVPs

Q1. Discuss, compare and contrast various curve fitting and interpolation methods

Jim Lambers MAT 460/560 Fall Semester Practice Final Exam

GEOMETRIC MODELLING WITH BETA-FUNCTION B-SPLINES, I: PARAMETRIC CURVES

Chapter 3 Interpolation and Polynomial Approximation

Taylor Series and Maclaurin Series

1 Piecewise Cubic Interpolation

Numerical Marine Hydrodynamics

Interpolation & Polynomial Approximation. Hermite Interpolation I

2

2.29 Numerical Fluid Mechanics Fall 2009 Lecture 13

Applied Numerical Analysis (AE2220-I) R. Klees and R.P. Dwight

Introduction to Computer Graphics. Modeling (1) April 13, 2017 Kenshi Takayama

Newton s Method and Linear Approximations

Applied Numerical Analysis

Christmas Calculated Colouring - C1

CMSC427 Parametric curves: Hermite, Catmull-Rom, Bezier

Intro Polynomial Piecewise Cubic Spline Software Summary. Interpolation. Sanzheng Qiao. Department of Computing and Software McMaster University

F I F T H E D I T I O N. Introductory Methods of Numerical Analysis. S.S. Sastry

Solving models with (lots of) idiosyncratic risk

Intro Polynomial Piecewise Cubic Spline Software Summary. Interpolation. Sanzheng Qiao. Department of Computing and Software McMaster University

Polynomial approximation and Splines

1 Roots of polynomials

A butterfly algorithm. for the geometric nonuniform FFT. John Strain Mathematics Department UC Berkeley February 2013

Transcription:

1/20 Numerical Methods I: Interpolation (cont ed) Georg Stadler Courant Institute, NYU stadler@cims.nyu.edu November 30, 2017

Interpolation Things you should know 2/20 I Lagrange vs. Hermite interpolation I Conditioning of interpolation I Uniform vs. non-uniform points, Lebesgue constant I Polynomial bases: Lagrange, Newton, Monomial

Classical polynomial interpolation Newton polynomial basis 3/20 The Newton basis! 0,...,! n is given by Yi 1! i (t) := (t t j ) 2 P i. j=0 The leading coe cient a n of the interpolation polynomial of f P (f t 0,...,t n )=a n x n +... is called the n-th divided di erence, [t 0,...,t n ]f := a n.

Classical polynomial interpolation Newton polynomial basis 4/20 Theorem: For f 2 C n, the interpolation polynomial P (f t 0,...,t n ) is given by P (t) = nx [t 0,...,t i ]f! i (t). i=0 If f 2 C n+1,then f(t) =P (t)+[t 0,...,t n,t]f! n+1 (t). This property allows to estimate the interpolation error.

Classical polynomial interpolation Divided di erences 5/20 The divided di erences [t 0,...,t n ]f satisfy the following properties: I [t 0,...,t n ]P =0for all P 2 P n 1. I If t 0 =...= t n : nodes. [t 0,...,t n ]f = f (n) (t 0 ) n!

Classical polynomial interpolation Divided di erences 6/20 I The following recurrence relation holds for t i 6= t j (nodes with a hat are removed): [t 0,...,t n ]f = [t 0,...,ˆt i,...,t n ]f [t 0,..., ˆt j,...,t n ]f t j t i I If f 2 C n [t 0,...,t n ]f = 1 n! f (n) ( ) with an a apple apple b, and the divided di erences depend continuously on the nodes.

Classical polynomial interpolation Divided di erences 7/20 Let us use divided di erences to compute the coe cients for the Newton basis for the cubic interpolation polynomial p that satisfies p(0) = 1, p(0.5) = 2, p(1) = 0, p(2) = 3. t i 0 [t 0 ]f =1 0.5 [t 1 ]f =2 [t1]f [t 0 t 1 ]f = t 1 [t0]f t 0 =2 1 [t 2 ]f =0 [t2]f [t 1 t 2 ]f = t 2 [t1]f t 1 = 4 [t 0 t 1 t 2 ]f = 6 2 [t 3 ]f =3 [t3]f [t 2 t 3 ]f = t 3 [t2]f t 2 =3 [t 1 t 2 t 3 ]f = 14 3 Thus, the interpolating polynomial is 16 3 p(t) =1 + 2t + ( 6)t(t 0.5) + 16 t(t 0.5)(t 1). 3

Classical polynomial interpolation Divided di erences 8/20 Let us now use divided di erences to compute the coe cients for the Newton basis for the cubic interpolation polynomial p that satisfies p(0) = 1, p 0 (0) = 2, p 00 (0) = 1, p(1) = 3. t i 0 [t 0 ]f =1 0 [t 0 ]f =1 [t 0 t 1 ]f = p 0 (0) = 2 0 [t 0 ]f =1 [t 1 t 2 ]f = p 0 (0) = 2 [t 0 t 1 t 2 ]f = p00 (0) 2! = 1 2 [t3]f [t0]f 1 1 [t 3 ]f =3 [t 2 t 3 ]f = t 3 t 0 =2 0 2 Thus, the interpolating polynomial is p(t) =1 + 2t + 1 2 t2 + ( 1 2 )t3

Classical polynomial interpolation Approximation error If f 2 C (n+1),then 9/20 f(t) P (f t 0,...,t n )(t) = f (n+1) ( ) (n + 1)!! n+1(t) for an appropriate = (t), a< <b. In particular, the error depends on the choice of the nodes. For Taylor interpolation, i.e., t 0 =...= t n,thisresultsin: f(t) P (f t 0,...,t n )(t) = f (n+1) ( ) (n + 1)! (t t 0) n+1

Classical polynomial interpolation Approximation error 10 / 20 Consider functions {f 2 C n+1 ([a, b]) : sup f n+1 ( ) apple M(n + 1)!} 2[a,b] for some M>0, then the approximation error depends on! n (t), and thus on t 0,...,t n. Thus, one can try to minimize max! n+1(t), aappletappleb which is achieved by choosing the nodes as the roots of the Chebyshev polynomial of order (n + 1).

Classical polynomial interpolation Approximation error 11 / 20 Summary on pointwise convergence: I If an interpolating polynomial is close/converges to the original function depends on the regularity of the function and the choice of interpolation nodes I For a good choice of interpolation nodes, fast convergence can be obtained for almost all functions

Classical polynomial interpolation Interpolation/Least square approximation/splines I Polynomial interpolation I Least squares with polynomials I Splines (i.e., piecewise polynomial interpolation): 12 / 20

Splines 13 / 20 Assume (l + 2) pairwise disjoint nodes: a = t 0 <t 1 <...<t l+1 = b. A spline of degree k 1 (order k) is a function in C k 2 which on each interval [t i,t i+1 ] coincides with a polynomial in P k 1. Most important examples: I linear splines, k =2 I cubic splines, k =4

Splines Cubic splines look smooth: So s a = to 14 / 20

Splines B-splines 15 / 20 B-splines are a basis in the spline space that: I has local support I satisfies a 3-term recursion I non-negative

Splines B-splines 16 / 20 I Coe cients for interpolation with the B-spline basis can be computed e ciently using the De Boor algorithm. I Splines are essential in Computer Aided Design (CAD). I Also important in CAD: Bezier curves (these do not interpolate points and have useful geometrical properties).

Trigonometric Interpolation For periodic functions 17 / 20 Instead of polynomials, use sin(jt), cos(jt) for di erent j 2 N. For N 1, we define the set of complex trigonometric polynomials of degree apple N 1 as 8 9 < NX 1 = T N 1 := c j e ijt,c j 2 C : ;, j=0 where i = p 1. Complex interpolation problem: Givenpairwisedistinctnodes t 0,...,t N 1 2 [0, 2 ) and corresponding nodal values f 0,...,f N 1 2 C, find a trigonometric polynomial p 2 T N 1 such that p(t i )=f i,fori =0,...,N 1.

Trigonometric Interpolation I There exists exactly one p 2 T N interpolation problem. 1, which solves this I Choose the equidistant nodes t k := 2 k N for k =0,...,N 1. Then, the trigonometric polynomial that satisfies p(t i )=f i for i =0,...,N 1 has the coe cients c j = 1 N NX 1 k=0 e 2 ijk N fk. I For equidistant nodes, the linear map from C N! C N defined by (f 0,...,f N 1 ) 7! (c 0,...,c N 1 ) is called the discrete Fourier transformation (DFT). 18 / 20

19 / 20 iscrete Fourier transform The interpolation problem (f 0,...,f N 1 ) 7! (c 0,...,c N 1 ) and its inverse require the multiplication or solution with a dense n n system, i.e., at least O(n 2 ) flops. However, the special structure of the system matrix allows performing those operations using a much faster algorith, the Fast Fournier Transform (FFT).

Trigonometric Interpolation 20 / 20 The Fast Fourier Transform (FFT) is a (very famous!) algorithm that computes the DFT and its inverse in O(n) flops. I Note that uniform nodes are used (and even required for the FFT). I Tensor products on square domains can be used for two dimensional approximations, i.e., p(x)p(y). I Can be used to approximate and solve di erential equations (see Numerical Methods II).