Assigned: Thursday Oct. 31, 2013 Due Date: Thursday Nov. 7, 2013 MATH 373: Homework 6 “Interpolation II” Fall 2013 NOTE: For each homework assignment observe the following guidelines: • Include a cover page. • Always clearly label all plots (title, x-label, y-label, and legend). • Use the subplot command from MATLAB when comparing 2 or more plots to make comparisons easier and to save paper. 1. Show that the Chebyshev polynomial Tn (x) is a solution to the differential equation: 1 − x2 2. Show that Z 1 −1 d2 y dy −x + n2 y = 0. 2 dx dx 0, Tn (x) Tm (x) √ dx = π, 1 − x2 π 2, m 6= n, m = n = 0, m = n > 1. This implies that the Chebyshev polynomials √ form an orthogonal set on [−1, 1] with respect to the weight function, w(x) = 1/ 1 − x2 . HINT: make the substitution x = cos(θ). 3. Consider the following definition: Definition. For each non-negative integer n, the Legendre polynomial Pn (x) satisfies the 3-term recurrence relation: 2n − 1 n−1 Pn (x) = xPn−1 (x) − Pn−2 (x), n n with P0 (x) = 1 and P1 (x) = x. The Legendre polynomials satisfy the following orthogonality relationship: ( Z 1 0, j 6= k, Pj (x)Pk (x) dx = 2 j = k. −1 2j+1 , (a) Explicitly find the Legendre polynomials for n = 2, 3, 4, 5. (b) For each of these Legendre polynomials (i.e., n = 2, 3, 4, 5), explicitly (i.e., by hand) find the roots. HINT: for n = 4 and n = 5 use the substitution z = x2 to solve. 4. Let q(x) be an arbitrary polynomial of degree n − 1. 1 Assigned: Thursday Oct. 31, 2013 Due Date: Thursday Nov. 7, 2013 (a) Show that q can be written as q(x) = c0 P0 (x) + c1 P1 (x) + c2 P2 (x) + · · · + cn−1 Pn−1 (x), by giving expressions for how to compute c0 , c1 , . . . , cn−1 . HINT: use the orthogonality relationship. (b) Use the above result to show that Z 1 Pk (x) q(x) dx = 0, −1 for any integer k ≥ n. 5. In class we considered the problem of find the optimal interpolation points on [−1, 1] using the L∞ -norm. Consider now the L2 -norm instead: sZ 1 kf kL2 := [f (x)]2 dx. −1 We consider the problem of finding the optimal interpolation points: min kf −pn kL2 ≤ kf kL2 min kωn+1 kL2 , (n + 1)! where ωn+1 (x) = (x − x0 ) (x − x1 ) · · · (x − xn ) . Prove the following theorem: Theorem. Let ωn be any monic polynomial of degree n and let P̃n be the monic Legendre polynomial of degree n. Then min kP̃n kL2 ≤ min kωn kL2 , with equality only when ωn = P̃n . This theorem is telling us that the optimal interpolation points x0 , x1 , . . . , xn on [−1, 1] are the n + 1 roots of Pn+1 (x). HINT: Any monic polynomial of degree n, ωn , can be written as follows: ωn (x) = P̃n (x) + q(x), where q is a polynomial of degree at most n − 1. Start with kωn k2L2 and simplify. 6. Consider the function f (x) = sin(πx) on [−1, 1]. (a) Interpolate this function with a polynomial of degree at most 4 using the optimal L2 points. Feel free to use your divided difference code from the previous assignment. (b) Plot the function and the interpolating polynomial on the same plot. 7. Consider the function f (x) = 1/x on [1, 4]. (a) Interpolate this function with a polynomial of degree at most 5 using the optimal L2 points. Feel free to use your divided difference code from the previous assignment. (b) Plot the function and the interpolating polynomial on the same plot. 2