03.03.2014 Views

Numerical Methods Course Notes Version 0.1 (UCSD Math 174, Fall ...

Numerical Methods Course Notes Version 0.1 (UCSD Math 174, Fall ...

Numerical Methods Course Notes Version 0.1 (UCSD Math 174, Fall ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

5.2. ERRORS IN POLYNOMIAL INTERPOLATION 71<br />

Example Problem 5.9. How many Chebyshev nodes are required to interpolate the function<br />

f(x) = sin(x) + cos(x) to within 10 −8 on the interval [0, π]?<br />

Solution: We first find the derivatives of f<br />

f ′ (x) = cos(x) − sin(x)<br />

f ′′ (x) = − sin(x) − cos(x)<br />

f ′′′ (x) = − cos(x) + sin(x)<br />

As a crude approximation we can assert that<br />

∣<br />

∣f (k) (x) ∣ ≤ |cos x| + |sin x| ≤ 2.<br />

Thus it suffices to take n large enough such that<br />

.<br />

π n+1<br />

2 2n+1 (n + 1)! 2 ≤ 10−8<br />

By trial and error we see that n = 10 suffices.<br />

⊣<br />

5.2.2 Interpolation Error for Equally Spaced Nodes<br />

Despite the proven superiority of Chebyshev Nodes, and the problems with the Runge Function,<br />

equally spaced nodes are frequently used for interpolation, since they are easy to calculate 2 . We<br />

now consider bounding<br />

n∏<br />

max |x − x i | ,<br />

x∈[a,b]<br />

i=0<br />

where<br />

(b − a)<br />

x i = a + hi = a + i, i = 0, 1, . . . , n.<br />

n<br />

Start by picking an x. We can assume x is not one of the nodes, otherwise the product in<br />

question is zero. Then x is between some x j , x j+1 We can show that<br />

|x − x j | |x − x j+1 | ≤ h2<br />

4 .<br />

by simple calculus.<br />

Now we claim that |x − x i | ≤ (j − i + 1) h for i < j, and |x − x i | ≤ (i − j) h for j + 1 < i. Then<br />

n∏<br />

i=0<br />

|x − x i | ≤ h2<br />

4<br />

[<br />

(j + 1)!h<br />

j ] [ (n − j)!h n−j−1] .<br />

It can be shown that (j + 1)!(n − j)! ≤ n!, and so we get an overall bound<br />

2 Never underestimate the power of laziness.<br />

n∏<br />

i=0<br />

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

.<br />

4

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

Saved successfully!

Ooh no, something went wrong!