Description
The speci c heat capacity of a substance corresponds to the amount of heat needed per unit mass to increase its temperature by one unit. This homework asks you to estimate the the speci c heat capacity C(T ) (in Joule / (Kelvin Mole)) of graphite, a crystalline form of the atom carbon, as a function of temperature T (in Kelvin) by employing polynomial interpolation.
A chemist measures (in the units speci ed in the previous paragraph) the speci c heat capacity, as well as the rateofchange in the speci c heat capacity (i.e., the derivative of the speci c heat capacity), of graphite at various temperatures in the interval [300; 600]. The data is provided together with this homework; see specheat data.mat. This data consists of 25 triplets of the form (T_{j} ; C_{j} ; D_{j} ) for j = 1; : : : ; 25, where T_{j} represents the temperature, C_{j} is the measured speci c heat capacity, D_{j} is the measured derivative of the speci c heat capacity at temperature T_{j} . A plot of the data is given in Figure 1 below.

16
0.04
14
0.035
0.03
12
0.025
10
0.02
8
0.015
300
350
400
450
500
550
600
300
350
400
450
500
550
600
Figure 1: The plot of the data (T_{j} ; C_{j} ; D_{j} ) for j = 1; : : : ; 25, where the horizontal axis is the temperature, whereas the vertical axis corresponds to the speci c heat capacity on the left, and its derivative on the right. (Left) (T_{j} ; C_{j} ) for j = 1; : : : ; 25. (Right) (T_{j} ; D_{j} ) for j = 1; : : : ; 25.
1
As discussed in class there exists a unique polynomial C(T ) of degree n 1 such that
C(T_{k}_{j} ) = C_{k}_{j} for j = 1; : : : ; n;
where k_{1}; : : : ; k_{n} 2 f1; : : : ; 25g are distinct integers. For instance, the unique polynomial C(T ) of degree 5 such that C(T_{4j} ) = C_{4j} for j = 1; : : : ; 6 is plotted below, where the interpolation points are marked with black crosses.

18
16
14
12
10
8
300
350
400
450
500
550
600
Figure 2: The blue curve is the graph of the unique polynomial C(T ) of degree
5 such that C(T_{4j} ) = C_{4j} for j = 1; : : : ; 6.
In all parts below, you can use the Matlab routines discussed in class and made available on the course webpage. In each part, you must include the printouts of the Matlab commands you used, and/or the Matlab routines you implemented, in addition to what is asked in the question.

Find the cubic polynomial through the points
(T_{6}; C_{6}); (T_{12}; C_{12}); (T_{18}; C_{18}); (T_{24}; C_{24})
using the Vandermonde matrix based approach, in particular by solving a linear system whose coe cient matrix is a Vandermonde matrix.
Provide a plot of the cubic polynomial that you computed, similar to the plot in Figure 2. Provide also precisely the coe cients of the polynomial you computed.

Find the polynomial of degree 7 through the points
(T_{3j} ; C_{3j} ) j = 1; : : : ; 8
2
using the Lagrange interpolation. Again provide a plot of the computed polynomial (similar to Figure 2), as well as the coe cients of the polynomial.

Hermite interpolation involves not only the interpolation of the function values, but also the interpolation of the derivatives. For instance, there exists a

unique polynomial C(T ) of degree 2n 1 such that
C(T_{k}_{j} ) = C_{k}_{j} and C^{0}(T_{k}_{j} ) = D_{k}_{j} for j = 1; : : : ; n;
(0.1)
where again k_{1}; : : : ; k_{n} 2 f1; : : : ; 25g are distinct integers.
Devise a generalization of the Vandermonde matrix based approach discussed in the class for Hermite interpolation so that the polynomial C(T ) satis es (0.1) for a speci ed integer n and speci ed k_{1}; : : : ; k_{n} 2 f1; : : : ; 25g. In particular, you must set up a linear system
Ax = b
where A is a 2n 2n Vandermondelike matrix, then solve the linear system using the command x = Anb in Matlab.
Implement your method in Matlab. Then use it to nd the unique polynomial C(T ) of degree 5 such that
C(T_{8j} ) = C_{8j} and C^{0}(T_{8j} ) = D_{8j}
for j = 1; 2; 3. Provide the plot of the computed C(T ) following the practice in Figure 2. Additionally, provide the plot of C^{0}(T ) again following the practice in Figure 2, but by employing the data points for the derivatives, i.e., by employing the points on the righthand side of Figure 1 rather than the lefthand side. Also include the coe cients of the computed polynomial.

It is also possible to perform Hermite interpolation using the Newton form. De ning x_{1}; : : : ; x_{2n} by x_{2j} _{1} = x_{2j} = T_{k}_{j} , it can be shown that the polynomial of degree 2n 1 satisfying (0.1) can be expressed as
C(T ) = c_{1} + c_{2 2}(T ) + c_{3 3}(T ) + + c_{n n}(T )
where c_{1} = f(x_{1}) and
_{j} (T ) = (T x_{1})(T x_{2}) : : : (T x_{j} _{1}); c_{j} = f[x_{1}; x_{2}; : : : ; x_{j} ]
for j = 2; 3; : : : ; n.
The divided di erences are still de ned nearly as discussed in the class, that is, for j > i, we have

f[x_{i}; : : : ; x_{j} ] :=
f[x_{i+1}; : : : ; x_{j} ]
f[x_{i}; : : : ; x_{j} _{1}]
and f[x_{i}] := f(x_{i})
x_{j}
x_{i}
3
with the only exception
f[x_{i}; x_{i+1}] :=
8
>f^{0}(x_{i})
<
f(x_{i+1}) f(x_{i})
>
^{:} x_{i+1} x_{i}
if x_{i} = x_{i+1};
if x_{i} 6= x_{i+1}:
Implement the Newton form in Matlab. Use it to nd the unique polynomial C(T ) of degree 9 such that
C(T_{5j} ) = C_{5j} and C^{0}(T_{5j} ) = D_{5j}
for j = 1; 2; 3; 4; 5. Once again provide the plots of the computed C(T ) and C^{0}(T ), as well as the coe cients of C(T ).
4