MATH661 Homework 6 - Polynomial approximation

Posted: 10/18/21

Due: 10/25/21, 11:55PM

1Track 1

  1. Determine the interpolating polynomial of

    f(x)=sin(cos(x))+cos(sin(x))

    using n=2k equidistant nodes in the interval x[-π,π], for k=2,3,4,5. In each case:

    1. Find the coefficients in the monomial basis by solving the system 𝑽𝒂=𝒚, where yi=f(xi). Use the Julia backslash operator.

    2. Find the coefficients in the Newton basis by solving the system 𝑵𝒄=𝒚. Use the Julia backslash operator.

    3. Find the coefficients in the Newton basis by computing the table of divided differences.

    4. Plot the above approximations evaluated at n=26 equidistant points along with the plot of the exact function f(x). Comment on what you observe.

  2. Revisit the approximation of the Runge function from HW03. Comment on the accuracy of polynomial approximation of the Runge function by comparison to that of f(x).

2Track 2

  1. Read “Barycentric Lagrange Interpolation” in SIAM Review, 2004 Vol. 46, No. 3, pp. 501–517 by Jean-Paul Berrut and Lloyd N. Trefethen.

  2. Implement functions to construct the divided-difference coefficients of the Newton interpolating polynomial, and evaluate the resulting polynomial for arbitrary x. Test on f(x) from Track 1, Q1.

  3. Implement functions to construct the barycentric Lagrange formulas (3.3), (4.2), and test on f(x).