Problem Set 5:   Interpolation and Numerical Differentiation
```Consider the four data points:

x:  0  1  2  3

y:  9  8  5  7

They are assumed to be values of some function f(x).

1. Interpolation
a. Construct the 3rd degree interpolating polynomial P3(x) using the Lagrange basis.
b. Construct the 3rd degree interpolating polynomial P3(x) using the Newton basis.
c. Show that they produce the same polynomial.
d. Plot the data and the interpolant on the same plot.
e. Use Matlab's  pchip interpolant, evaluate it at x=1.5 and compare with P3(1.5).

2. Derivatives
Approximate f'(1)  (the first derivative of f at x=1)
a. by a forward difference.
b. by a backward difference.
c. by a centered difference.
d. which one would you "trust" most ?  why ?
e. Another approximation of f'(1) would be P'3(1)
(the derivative of the cubic interpolant you constructed above).
Find the value.

3.a. Construct the quadratic polynomial P2(x) interpolating the first 3 points.
b. P'2(1)  is yet another approximation of f'(1).
Does it agree with any of the above ?
c. Try to find the slope of the pchip interpolant at x=1.
Compare with the other approximations to f'(1).
```
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "url": "http://www.math.utk.edu/~vasili/371/PS/ps5.interp-diff.html", "fetch_time": 1542720991000000000, "content_mime_type": "text/html", "warc_filename": "crawl-data/CC-MAIN-2018-47/segments/1542039746398.20/warc/CC-MAIN-20181120130743-20181120152743-00117.warc.gz", "warc_record_offset": 457263350, "warc_record_length": 1309, "token_count": 331, "char_count": 1162, "score": 3.8125, "int_score": 4, "crawl": "CC-MAIN-2018-47", "snapshot_type": "latest", "language": "en", "language_score": 0.8449683785438538, "file_path": "/sailhome/yjruan/project/latent-lm/data/processed/finemath-4plus/finemath-4plus/train-00006-of-00064.parquet"}