Chapter 3Interpolation3.1Polynomial InterpolationOne of the basic tools for approximating a function or a given data set isinterpolation. In this chapter we focus on polynomial and piece-wise poly-nomial interpolation.The polynomialinterpolation problemcan be stated as follows:Givenn+ 1 distinct points,x0, x1, ..., xncallednodesand corresponding valuesf(x0), f(x1), ..., f(xn), find a polynomial of degree at mostn,pn, which sat-isfies (the interpolation property)pn(x0) =f(x0),pn(x1) =f(x1),...pn(xn) =f(xn).Let us represent such polynomial aspn(x) =a0+a1x+· · ·+anxn. Then,the interpolation property impliesa0+a1x0+· · ·+anxn0=f(x0),a0+a1x1+· · ·+anxn1=f(x1),...a0+a1xn+· · ·+anxnn=f(xn).31
32CHAPTER 3.INTERPOLATIONThis is a linear system ofn+1 equations inn+1 unknowns (the polynomialcoefficientsa0, a1, . . . , an). In matrix form:266641x0x20· · ·xn01x1x21· · ·xn1...1xnx2n· · ·xnn3777526664a0a1...an37775=26664f(x0)f(x1)...f(xn).37775(3.1)Does this linear system have a solution? Is this solution unique? The answeris yes to both.Here is a simple proof.Takef⌘0, thenpn(xj) = 0,forj= 0,1, ..., nbutpnis a polynomial of degree at mostn, it cannot haven+ 1 zeros unlesspn⌘0, which impliesa0=a1=· · ·=an= 0. That is,the homogenous problem associated with (3.1) has only the trivial solution.Therefore, (3.1) has a unique solution.In general, the values to interpolate might not come from a function.They can be regarded as just data supplied to us.We will often write(x0, f0),(x1, f1), etc., to emphasize this more general setting.Example 5.As an illustration let us consider interpolation by a linear poly-nomial,p1. Suppose we are given(x0, f0)and(x1, f1). We have writtenp1explicitly in the Introduction. We write it now in a di↵erent form:p1(x) =x-x1x0-x1f0+x-x0x1-x0f1.(3.2)Clearly, this polynomial has degree at most 1 and satisfies the interpolationproperty:p1(x0) =f0,(3.3)p1(x1) =f1.(3.4)Example 6.Given(x0, f0),(x1, f1),(x2, f2)let us constructp2, the polyno-mial of degree at most 2 which interpolates these points. The way we havewrittenp1in (3.2) is suggestive of how to explicitly writep2:p2(x) =(x-x1)(x-x2)(x0-x1)(x0-x2)f0+(x-x0)(x-x2)(x1-x0)(x1-x2)f1+(x-x0)(x-x1)(x2-x0)(x1-x1)f2.
3.1.POLYNOMIAL INTERPOLATION33If we definel0(x) =(x-x1)(x-x2)(x0-x1)(x0-x2),(3.5)l1(x) =(x-x0)(x-x2)(x1-x0)(x1-x2),(3.6)l2(x) =(x-x0)(x-x1)(x2-x0)(x1-x1),(3.7)then we simply havep2(x) =l0(x)f0+l1(x)f1+l2(x)f2.(3.8)Note that each of the polynomials (3.5), (3.6), and (3.7) are exactly of degree2 and they satisfylj(xk) =δjk1. Therefore, it follows thatp2given by (3.8)satisfies the interpolation propertyp2(x0) =f0,(3.9)p2(x1) =f1,(3.10)p2(x2) =f2.(3.11)We can now write down the polynomial (of degree at mostn) whichinterpolatesn+ 1 given values, (x0, f0), . . . ,(xn, fn), where the interpolationnodesx0, . . . , xnare assumed distinct.