BC 3 Polynomial Approximations I Name: ____________________ Interpolation One way to approximate a function with a polynomial is to choose a polynomial that actually equals the function at a few points, in the hopes that it will be a good approximation at other, nearby points. Consider the function f(x) = cos(x). Let’s find a polynomial that actually equals this function at a few points. 1) Find a quadratic polynomial, q(x) = ax2 + bx + c, which has the same values as f(x) = cos(x) at x = 0, x , and x = . 2 2 2) Sketch graphs of both f(x) and q(x) on both sets of axes below. Try to draw accurately, labeling which graph is which! Note that the scales are different on the two sets of axes. 2 -2 -2 IMSA 5 2 -5 -5 Poly Approx 1 p.1 5 3) Why is the second graph so much worse-looking an approximation than the first? Interpolation is the term given to choosing a polynomial that exactly matches the function we are interested in at a few selected points, hoping that it will make a good approximation at other, nearby points. It does a pretty good job in general. 4) If we interpolate at x = -, x = 0, and x = instead of -/2, 0, and /2, would our results get better or worse? In what way? 5) If we wish to interpolate at n points, explain why we can always use a polynomial whose degree is n – 1 (or less). It can be quite a lot of work to find all the coefficients of the interpolating polynomial! We have to plug in the points, get a bunch of equations, and solve for all the coefficients. Try to interpolate cos(x) with a few more interpolation points (official term: “knots”): 6) Find the interpolating polynomial that matches cos(x) at x , , and . (Hint: If 2 2 you wish to do this by hand, since it’s a fourth degree polynomial (n = 5 in question 5), we can sort of “factor” the polynomial as a0 a1 x a2 x x a3 x x x a4 x x x x and then 2 2 2 2 plug in various values of x and solve for the a’s. Then multiply it all out! You may use the space on the back page of this packet for scratch work.) IMSA Poly Approx 1 p.2 , 0, 7) Plot cos(x) and your fourth-degree interpolating polynomial together. Choose a couple of different ranges to get an idea of where the polynomial is a good approximation and where it isn’t. Label your graphs! 8) Could the interpolating polynomial be used in calculus applications? Evaluate its derivative at x = 1, and its integral from 0 to 1. Compare to the exact values you would obtain for cos(x). IMSA Poly Approx 1 p.3