Hermite Interpolation

Here we do Hermite Interpolation.  We start with a list of points,

  {  {(Subscript[x, 0]),(Subscript[y, 0]),(Subscript[z, 0])}, {(Subscript[x, 1]),(Subscript[y, 1]),(Subscript[z, 1])}, . . . , {(Subscript[x, n]),(Subscript[y, n]),(Subscript[z, n])}  }.

Here (Subscript[x, i]) and (Subscript[y, i]) represent the coordinates of the point, and (Subscript[z, i]) represents
dy/dx, that is, the slope at that point.

list={{1,2,1},{2,3,0},{4,4,-1},{5,5,0}};
n=Length[list]-1;
Clear[x,y,z]
Do[x[k]=list[[k+1,1]];y[k]=list[[k+1,2]];z[k]=list[[k+1,3]],{k,0,n}]

Let's show these points on a plot, with little lines showing the slope.

plot1=Show[ListPlot[Table[{x[k],y[k]},{k,0,n}],
			               PlotStyle->{Red,PointSize[0.02]}],
		Table[
			  Plot[Evaluate[y[k]+z[k] (xx-x[k])],{xx,x[k]-0.5,x[k]+0.5},
				            PlotStyle->{Blue}],
			 {k,0,n}]]

Now let us do Hermite Interpolation.  These are the formulae from the text book.

Do[
	L[i,xx_]=((∏_(j=0)^(i-1))((xx-x[j])/(x[i]-x[j]))) ((∏_(j=i+1)^n)((xx-x[j])/(x[i]-x[j])));
	H[i,xx_]=(1-2 (xx-x[i]) ((∂_z)L[i,z]/.z->x[i])) ((L[i,xx])^2);
	Hh[i,xx_]=(xx-x[i]) ((L[i,xx])^2),
	{i,0,n}]

Table[Plot[H[k,xx],{xx,x[0]-1,x[n]+1},PlotRange->{-1,1}],{k,0,n}]
Table[
	Plot[Hh[k,xx],{xx,x[0]-1,x[n]+1},PlotRange->{-1,1}],{k,0,n}]

p[x_]=Expand[(∑_(k=0)^n)(y[k] H[k,x]+z[k] Hh[k,x])]

And let's plot it:

plot2=Plot[p[xx],{xx,x[0]-0.25,x[n]+0.25}];
Show[plot1,plot2]