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

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

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

9.2. ORTHONORMAL BASES 119<br />

g 0 (x 0 ) = 1, g 0 (x 1 ) = 0, g 0 (x 2 ) = ɛ<br />

g 1 (x 0 ) = 1, g 1 (x 1 ) = ɛ, g 1 (x 2 ) = 0<br />

After much work we find we want to solve<br />

[ ] [ ] [ ]<br />

1 + ɛ<br />

2<br />

1 c0 y0 + ɛy<br />

1 1 + ɛ 2 =<br />

2<br />

c 1 y 0 + ɛy 1<br />

However, the computer would only find this if it had infinite precision. Since it does not, and since<br />

ɛ is rather small, the computer thinks ɛ 2 = 0, and so tries to solve the system<br />

[ ] [ ] [ ]<br />

1 1 c0 y0 + ɛy<br />

=<br />

2<br />

1 1 c 1 y 0 + ɛy 1<br />

When y 1 ≠ y 2 , this has no solution. Bummer.<br />

This kind of thing is common in the method of least squares: the coefficients of the normal<br />

equations include terms like<br />

g i (x k )g j (x k ).<br />

PSfrag replacements<br />

When the g i are small at the nodes x k , these coefficients can get really small, since we are squaring.<br />

Now we draw a rough sketch of the basis functions. We find they do a pretty poor job of<br />

discriminating around all the nodes.<br />

1.5<br />

g 0 (x)<br />

g 1 (x)<br />

1<br />

0.5<br />

0<br />

-0.5<br />

-1<br />

-1.5<br />

-1 -0.5 0 0.5 1<br />

Figure 9.2: The basis functions g 0 (x) = ( ɛ<br />

2 − 1) x 2 − ɛ 2 x + 1, and g 1(x) = x 3 + ( ɛ<br />

2 − 1) ( x 2 + x ) + 1<br />

are shown for ɛ = 0.05. Note that around the three nodes 0, 1, −1, these two functions take nearly<br />

identical values. This can lead to a system of normal equations with no solution.<br />

9.2 Orthonormal Bases<br />

In the previous section we saw that poor choice of basis vectors can lead to numerical problems.<br />

Roughly speaking, if g i (x k ) is small for some i’s and k’s, then some d ij can have a loss of precision<br />

when two small quantities are multiplied together and rounded to zero.

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

Saved successfully!

Ooh no, something went wrong!