1/31 Numerical Methods I: Polynomial Interpolation Georg Stadler Courant Institute, NYU stadler@cims.nyu.edu November 16, 2017
lassical polynomial interpolation Given f i := f(t i ), i =0,...,n, we would like to find a polynomial P 2 P n such that P (t i )=f i. Interpolation is thus a map from R n+1! P n. Theorem: Given nodes (t i,f i ), 0 apple i apple n, withpairwisedistinct nodes t i, then there exists a unique interpolating polynomial P 2 P n. To compute that polynomial, we have to choose a basis in P n. 2/31
lassical polynomial interpolation 3/31 Monomial basis: 1,t,t 2... leads to system with Vandermonde matrix V n. I det(v n )= Q n i=0 Q n j=i+1 (t i t j ) 6= 0 I For larger n, this can be a poorly conditioned system.
lassical polynomial interpolation 4/31 Lagrange basis L i defined by L i (t j )= ij. I Simple interpolant: P (t) = P n i=0 f il i (t) I Not always practical. I Lagrange polynomials form an orthogonal basis in P n w.r. to the inner product (P, Q) := nx P (t i )Q(t i ) i=0
lassical polynomial interpolation 5/31 The Newton basis! 0,...,! n is given by Yi 1! i (t) := (t t j ) 2 P i. j=0 This polynomials are linearly independent as their degree increases. The coe cients in this basis can be computed e ciently (more later).
Tow (slightly) di erent perspectives 6/31 Interpolation can be seen as map between : R n+1 7! P n or as map between functions: : C([a, b]) 7! P n. is function evaluation at the nodes, followed by.
Conditioning Theorem: Let a apple t 0 <...<t n apple b be pairwise distinct and L i be the corresponding Lagrange polynomials. Then the absolute condition number of the polynomial interpolation: : C([a, b])! P n w.r. to the supremum norm is the Lebesgue constant apple abs = n = max t2[a,b] nx L i (t). Note that the Lebesgue constant depends on n and the location of the t i. i=1 7/31
Conditioning 8/31
9/31 Classical polynomial interpolation Conditioning Lebesgue constants for di erent orders: n 5 10 15 20 An for equidistant nodes 3.106292 29.890695 512.052451 10986.533993 An for Chebyshev nodes 2.104398 2.489430 2.727778 2.900825 Chebyshev nodes are the roots of the Chebyshev polynomials: 2i +1 t i = cos 2n +2, for i =0,...,n
10 / 31 Classical polynomial interpolation Conditioning Lebesgue constant for n = 10, uniformvs.chebyshevnodes:
11 / 31 Classical polynomial interpolation Conditioning Lebesgue constant for n = 40, uniformvs.chebyshevnodes:
ermite interpolation 12 / 31 Assume a = t 0 apple t 1 apple...apple t n = b with possibly duplicated nodes. If the node t i occurs k times, the corresponding node values correspond to f(t i ),f 0 (t i ),...,f k 1 (t i ). The Hermite interpolation polynomial p(x) is a polynomial of order n, which coincides with the nodal values (and, for duplicated nodes, derivatives at nodal values) at the nodes.
ermite interpolation Theorem: (somewhat loosely formulated version) Given n +1 nodes and nodal values (possibly of derivatives), then there exists a unique interpolating Hermite polynomial p 2 P n. Examples: I All t 0 =...= t n. I Cubic Hermite interpolation: Nodes: t 0 = t 1 <t 2 = t 3, Values: f(t 0 ),f 0 (t 0 ),f(t 1 ),f 0 (t 1 ). I locally cubic Hermite interpolation. 13 / 31
Newton polynomial basis 14 / 31 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.
Newton polynomial basis 15 / 31 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.
Newton polynomial basis 16 / 31
Divided di erences 17 / 31 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!
Divided di erences 18 / 31 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.
Divided di erences 19 / 31 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
Divided di erences 20 / 31 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
Approximation error If f 2 C (n+1),then 21 / 31 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
Approximation error 22 / 31 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).
Approximation error 23 / 31 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
Interpolation/Least square approximation/splines 24 / 31 I Polynomial interpolation I Least squares with polynomials I Splines (i.e., piecewise polynomial interpolation):