Inverse interpolation

Given (xk,fk) from a function f(x), supose we want to find an approximation of the value of x such that f(x)=c, where c is a given value.

We will solve the equation x=g(c) where g is the inverse function of f. Then we will interpolate this function g(y) and will evaluate it in y=c, or, in other words, if we use Newton's method we will put in the first column the values fj and in the second one the values xj and proceed the same way.

Example

For example, let's suppose that we want to calculate a zero of the function f(x)=x315x+4 knowing that this is close to x=0.3. Then we will do quadratic interpolation, for example, of the inverse of f(x). We then first evaluate the function in three points close to x=0.3:

x 0.2 0.3 0.4
f(x) 1.008 0.473 1.936

Now we fill in the table to calculate the divided differences of Newton, but exchanging the columns, obtaining the coefficients of the interpolating polynomial:

1.008 0.2    
    0.0675  
0.473 0.3   0.00028963
    0.0684  
1.936 0.4    

Thus the interpolating polynomial is:

P3(y)=0.2+0.0675(y1.008)+0.00028963(y1.008)(y0.473)=0.26790190900.067654y+0.00028963y2

So an approximation of the zero of the function is:

P3(0)=0.2679019090