**M371 - Alexiades**

**Problem Set 4: Interpolation **

A standard way to test interpolation of function or tabulated values is to use
as nodes *some* of the values and then compare at *unused* points.
Do the following BY HAND.
1. Construct the (2nd degree) polynomial interpolant for the function
** f(x) = √x** at the nodes **x**_{0}=0, x_{1}=1, x_{2}=4
i.e. with data points (x_{i} , y_{i}) where y_{i}=f(x_{i}).
a. using the Lagrange form [write formula, then plug in values!]
b. using the Newton form [write formula, then plug in values!]
c. Verify that they produce the same polynomial.
d. Evaluate the interpolant at x=1/4 and compare with the exact value.
e. Plot both f(x) and the interpolant on [0,4].
This can be done most easily in gnuplot:
gnuplot> **f(x)=sqrt(x) ; p(x) = (the polynomial you found)**
gnuplot> **plot [0:4] f(x) with lines lt 3, p(x) with lines lt 1**
Does it look like a good interpolant ?
2. Here is a table of (measured) thermal conductivity data for Cu (copper)
as function of Temperature T (in Kelvin):
T (K) 250 300 350 400 500
k (W/m.K) 406 401 396 393 386
a. Using T = 250, 350, 400 as nodes, contstruct a polynomial interpolant of the data.
b. Evaluate the interpolant at T=300 and compare with the data value.
c. Evaluate the interpolant at T=500 and compare with the data value.
Is this interpolation ?
d. Which one does better? why ? should one ever do c. ?
e. Now use T = 250, 350, 400, 500 as interpolation nodes to construct
another polynomial interporpolant.
f. Evaluate the new interpolant at T=300 and compare with the data value.
Compare with b.
3. Should one use interpolation to represent experimentally obtained data ? why ?