06.09.2021 Views

First Semester in Numerical Analysis with Julia, 2020a

First Semester in Numerical Analysis with Julia, 2020a

First Semester in Numerical Analysis with Julia, 2020a

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 3. INTERPOLATION 97<br />

Theorem. If po<strong>in</strong>ts x 0 ,x 1 , ..., x n are dist<strong>in</strong>ct, then for real values y 0 ,y 1 , ..., y n , there is a<br />

unique polynomial p n of degree at most n such that p n (x i )=y i ,i=0, 1, ..., n.<br />

Proof. We have already established the existence of p n <strong>with</strong>out mention<strong>in</strong>g it! The Lagrange<br />

form of the <strong>in</strong>terpolat<strong>in</strong>g polynomial constructs p n directly:<br />

p n (x) =<br />

n∑<br />

y k l k (x) =<br />

k=0<br />

n∑<br />

k=0<br />

y k<br />

n<br />

∏<br />

j=0,j≠k<br />

x − x j<br />

x k − x j<br />

.<br />

Let’s prove uniqueness. Assume p n ,q n are two dist<strong>in</strong>ct polynomials satisfy<strong>in</strong>g the conclusion.<br />

Then p n −q n is a polynomial of degree at most n such that (p n −q n )(x i )=0for i =0, 1, ..., n.<br />

This means the non-zero polynomial (p n − q n ) of degree at most n, has (n +1) dist<strong>in</strong>ct roots,<br />

which is a contradiction.<br />

The follow<strong>in</strong>g theorem, which we state <strong>with</strong>out proof, establishes the error of polynomial<br />

<strong>in</strong>terpolation. Notice the similarities between this and Taylor’s Theorem 7.<br />

Theorem 51. Let x 0 ,x 1 , ..., x n be dist<strong>in</strong>ct numbers <strong>in</strong> the <strong>in</strong>terval [a, b] and f ∈ C n+1 [a, b].<br />

Then for each x ∈ [a, b], there is a number ξ between x 0 ,x 1 , ..., x n such that<br />

f(x) − p n (x) = f (n+1) (ξ)<br />

(n +1)! (x − x 0)(x − x 1 ) ···(x − x n ).<br />

The follow<strong>in</strong>g lemma is useful <strong>in</strong> f<strong>in</strong>d<strong>in</strong>g upper bounds for |f(x) − p n (x)| us<strong>in</strong>g Theorem<br />

51, when the nodes x 0 , ..., x n are equally spaced.<br />

Lemma 52. Consider the partition of [a, b] as x 0 = a, x 1 = a + h, ..., x n = a + nh = b. More<br />

succ<strong>in</strong>ctly, x i = a + ih for i =0, 1, ..., n and h = b−a . Then for any x ∈ [a, b]<br />

n<br />

n∏<br />

|x − x i |≤ 1 4 hn+1 n!<br />

i=0<br />

Proof. S<strong>in</strong>ce x ∈ [a, b], it falls <strong>in</strong>to one of the sub<strong>in</strong>tervals: let x ∈ [x j ,x j+1 ]. Consider the<br />

product |x − x j ||x − x j+1 |. Put s = |x − x j | and t = |x − x j+1 |. The maximum of st given<br />

s+t = h, us<strong>in</strong>g Calculus, can be found to be h 2 /4, which is atta<strong>in</strong>ed when x is the midpo<strong>in</strong>t,

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!