Math128_hw13 - Math 128A, Spring 2007 Homework 13 Solution...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Math 128A, Spring 2007 Homework 13 Solution 1. For [−1, 1] and w(x) = 1 find the best mean-square approximation to x3 from among polynomials of degree no bigger than 2. Solution: We know that the first three Legendre polynomials, 1, x, and (3x2 − 1)/2, form an orthonormal basis for P2 with respect to the inner product 1 f, g = −1 f (x)g(x)dx So we need only compute q(x) = x3 , 1 1 + x3 , x x + x3 , (3x2 − 1)/2 (3x2 − 1)/2 = 2 x 5 2. For data (0, −2), (1, −1), (2, −1), (4, 3), (6, 4) and weight function w = (1, 2, 3, 2, 1), find the best mean-square linear approximation, by finding an orthonormal basis for P1 . Solution: The relevant inner product here is: f, g = f (0)g(0) + 2f (1)g(1) + 3f (2)g(2) + 2f (4)g(4) + f (6)g(6) To find an orthonormal basis, we apply Graham-Schmidt to the basis {1, x}, i.e. √ w0 = 1/||1|| = 1/ 1 + 2 + 3 + 2 + 1 = 1/3 w1 = x − x, w0 w0 = x − x, 1/3 1/3 = x − 22/9 ˆ w1 = w1 /||w1 || = w1 /(254/9) = x/254 − 11/127 ˆ ˆ ˆ and then the best approximation is q(x) = data, w0 w0 + data, w1 w1 1 ...
View Full Document

This note was uploaded on 05/07/2008 for the course MATH 128A taught by Professor Rieffel during the Spring '08 term at University of California, Berkeley.

Ask a homework question - tutors are online