Interpolation of Hermite

The Hermite polynomial is the one that interpolates a set of points and the value of their derivatives in any points we want. That is, let's suppose that we have (xk,fk) and (xk,fk).

Then we construct the same table as in Newton's method, placing xk in the first column and writing twice the same point if we know the value of the derivative at this point; in the second column the values of f corresponding to the x of the same line. Namely if we know the value of f in x0 and of its derivative we will write x0 twice and next to them we will write f0. For example,

x0 f0
x0 f0
x1 f1
x1 f1

From here on we proceed the same way, but with the difference that we have to define f[xi,xi]=fi, the value of the derivative in xi.

x0 f0      
    f0    
x0 f0   f[x0,x0,x1]  
    f[x0,x1]   f[x0,x0,x1,x1]
x1 f1   f[x0,x1,x1]  
    f1    
x1 f1      

Therefore, if we have n+1 values of the function and n+1 values of the derivatives, the Hermite polynomial will have a 2n+1 degree .

Let's consider an example:

Example

Let's suppose that we want to calculate f(18) where f(x)=tan(πx) from Hermite interpolation in 0,14.

To obtain the result, we draw a table as in Newton's interpolation but repeating every point which derivative we know. This is:

0 0      
    f(0)=π    
0 0   4π140=164π  
    10140=4   8π1616+4π140=148π128
14 1   2π4140=8π16  
    f(14)=2π    
14 1      

Proceeding as with Newton's interpolation, we get: P3(x)=πx+(164π)x2+(48π128)x2(x14)

Now, tan(π8)P3(18)=0.4018