Error in the Interpolation
Let PN(x) be the Nth degree polynomial through the (N+1) points x0, x1, . . ., xN and EN(x) is the error in the approximation of f(x) then : 
EN(x) = f(x) - PN(x)

Since both f(x) and PN(x) have same value at the xi, i = 0, 1, . . . N, the error E(x) can be written as

EN(x) = f(x) - PN(x) = (x - x0)(x - x1). . .(x - xN) g(x)

where g(x) represents the EN(x) at non tabulated points x. Obviously f(x) - PN(x) - EN(x) = 0

Þ f(x) - Pn(x) - (x - x0)(x - x1) . . . (x - xn) g(x) = 0

let us construct an auxilary function W(t) such that

W(t) = f(t) - PN(t) - (t - x0)(t - x1) . . . (t - xN) g(x)

i.e., W(t) is actually a function of t and x.

Now at all t = xi, i = 0, 1, . . . n W(t) is zero and also at t = x. Hence there are about (n+2) zero's of W(t).
If we impose the law of mean value on W(t) then W(t) must be continuous and differentiable. Also there exists a root of w'(t) between each of the (N+2) zeros of W(t), that is there and a total of (N+1) zeros of W(t). If there exists W''(t) then there are N zeros and similarly if the (N+1) derivative exists then there exist atleast a zero in the interval of (x0,xn) let us call this as t = x then
W(N+1)(x)  =  0  =   d n+1 [f(t) - Pn(t) - (t - x0)(t - x1) . . . (t - xn) g(x)]
dtn+1
   = f n+1(x) - 0 - (n+1)!g(x) 
Þ g(x)
    1 
f n+1(x)
(n+1)!

ÞEn(x) = (x - x0)(x - x1) . . .(x - xn)  f(n+1)(x) / (n+1)!                 x0 < x < xn

Example :

For the following data find f(0.15) accuracy for the maximum possible degree. Also obtain a bound on the truncation error for this approximation
 
 

xi
fi
 
 
 
 
0.1
0.09983
 
 
 
 
 
 
0.9884
 
 
 
0.2
0.19867 
 
-0.099499814
 
 
 
 
0.9685
 
-0.16000074
 
0.3
0.29552
 
-0.14750004
 
0.008332171
 
 
0.939 
 
-0.15666787
 
0.4
0.38942
 
 -0.1945004 
 
 
 
 
0.9001
 
   
0.5
0.47943
 
     

f(0.15) = 0.09983 + 0.9884( 0.15 - 0.1 )  - 0.099499814( 0.15 - 0.1 )( 0.15 - 0.2 )
                             -  0.16000074( 0.15 - 0.1 )( 0.15 - 0.2 )( 0.15 - 0.3 ) 
                             + 0.008332171( 0.15 - 0.1 )( 0.15 - 0.2 )  ( 0.15 - 0.3 )( 0.15 - 0.4 ) 

f(0.15) = 0.14943796

Error in the approximation
 
 

E5(x) = 
(.15 - .1) (.15 - .2) (.15 - .3) (.15 - .4) (.15 - .5)
f6(x)
6!

where 0.1 < x < 0.5,    f6(x) = - sin(x)

Max | f6(x) |0.1 < x < 0.5 = 0.47943

ÞE5(x) = 2.1849e-08


Solution of Transcendental Equations | Solution of Linear System of Algebraic Equations | Interpolation & Curve Fitting
Numerical Differentiation & Integration | Numerical Solution of Ordinary Differential Equations
Numerical Solution of Partial Differential Equations