Lagrange's Interpolation formula

In this section, we shall obtain an interpolating polynomial when the given data has unequal tabular points. However, before going to that, we see below an important result.

THEOREM 12.3.1   The $ k^{\mbox{th}}$ divided difference $ \delta[x_0,x_1,
\ldots,x_k]$ can be written as:
$\displaystyle \delta[x_0,x_1,\ldots,x_k]$ $\displaystyle =$ $\displaystyle \frac{f(x_0)}{(x_0-x_1)(x_0-x_2)\cdots(x_0 -
x_k)} + \frac{f(x_1)}{(x_1-x_0)(x_1-x_2)\cdots(x_1 - x_k)}$  
    $\displaystyle +
\cdots + \frac{f(x_k)}{(x_k-x_0)(x_k-x_1)\cdots(x_k - x_{k-1})}$  
  $\displaystyle =$ $\displaystyle \frac{f(x_0)}{\prod\limits_{j=1}^k (x_0 - x_j)}+\cdots +\frac{f(x...
... (x_l - x_j)}+\cdots+\frac{f(x_k)}{\prod\limits_{j=0,\;
j\neq k}^k (x_k - x_j)}$  

Proof. We will prove the result by induction on $ k.$ The result is trivially true for $ k=0.$ For $ k=1,$

$\displaystyle \delta[x_0,x_1] = \frac{f(x_1) - f(x_0)}{x_1 - x_0} =
\frac{f(x_0)}{x_0 - x_1} + \frac{f(x_1)}{x_1 - x_0}.$

Let us assume that the result is true for $ k = n,$ i.e.,
$\displaystyle \delta[x_0,x_1,\ldots,x_n]$ $\displaystyle =$ $\displaystyle \frac{f(x_0)}{(x_0-x_1)(x_0-x_2)\cdots(x_0 -
x_n)} + \frac{f(x_1)}{(x_1-x_0)(x_1-x_2)\cdots(x_1 - x_n)}$  
    $\displaystyle +
\cdots + \frac{f(x_n)}{(x_n-x_0)(x_n-x_1)\cdots(x_n -
x_{n-1})}.$  

Consider $ k=n+1,$ then the $ (n+1)^{\mbox{th}}$ divided difference is
$\displaystyle \delta[x_0,x_1,\ldots,x_{n+1}]$ $\displaystyle =$ $\displaystyle \frac{
\delta[x_1,x_2, \ldots,x_{n+1}] -
\delta[x_0,x_1,\ldots,x_n]}{x_{n+1} - x_0}$  
  $\displaystyle =$ $\displaystyle \frac{1}{x_{n+1}
- x_0}\left[\frac{f(x_1)}{(x_1-x_2)\cdots(x_1 - x_{n+1})} +
\frac{f(x_2)}{(x_2-x_1)(x_2-x_3)\cdots(x_2 - x_{n+1})} + \right.$  
    $\displaystyle \left. \cdots + \frac{f(x_{n+1})}{(x_{n+1}-x_1)\cdots(x_{n+1}
- x...
...ac{1}{x_{n+1} -
x_0}\left[\frac{f(x_0)}{(x_0-x_1)\cdots(x_0 - x_{n})} + \right.$  
    $\displaystyle \left.
\frac{f(x_1)}{(x_1-x_0)(x_1-x_2)\cdots(x_1 - x_{n})} + \cdots +
\frac{f(x_{n})}{(x_{n}-x_0)\cdots(x_{n} - x_{n-1})} \right]$  

which on rearranging the terms gives the desired result. Therefore, by mathematical induction, the proof of the theorem is complete. height6pt width 6pt depth 0pt

Remark 12.3.2   In view of the theorem 12.3.1 the $ k^{\mbox{th}}$ divided difference of a function $ f(x),$ remains unchanged regardless of how its arguments are interchanged, i.e., it is independent of the order of its arguments.

Now, if a function is approximated by a polynomial of degree $ n,$ then , its $ (n+1)^{\mbox{th}}$ divided difference relative to $ x,
x_0, x_1, \ldots, x_{n}$ will be zero,(Remark 12.2.6) i.e.,

$\displaystyle \delta[x,x_0,x_1, \ldots,x_{n}] = 0$

Using this result, Theorem 12.3.1 gives
    $\displaystyle \frac{f(x)}{(x-x_0)(x-x_1)\cdots(x - x_{n})} +
\frac{f(x_0)}{(x_0-x)(x_0-x_1)\cdots(x_0 - x_{n})} +$  
    $\displaystyle \hspace{1in} \frac{f(x_1)}{(x_1-x)(x_1-x_2)\cdots(x_1 - x_{n})}
+ \cdots+ \frac{f(x_{n})}{(x_{n}-x)(x_{n}-x_0)\cdots(x_{n} -
x_{n-1})} = 0,$  

or,
$\displaystyle \frac{f(x)}{(x-x_0)(x-x_1)\cdots(x - x_{n})}$ $\displaystyle =$ $\displaystyle - \left[
\frac{f(x_0)}{(x_0-x)(x_0-x_1)\cdots(x_0 - x_{n})} \right. +
\frac{f(x_1)}{(x_1-x)(x_1-x_0)(x_1-x_2)\cdots(x_1 - x_{n})}$  
    $\displaystyle \hspace{.5in} \left. + \cdots +
\frac{f(x_{n})}{(x_{n}-x)(x_{n}-x_0)\cdots(x_{n} -
x_{n-1})}\right],$  

which gives ,
$\displaystyle f(x)$ $\displaystyle =$ $\displaystyle \frac{(x-x_1)(x-x_2)\cdots(x -x_{n})}{(x_0-x_1)\cdots(x_0 -
x_{n}...
...c{(x-x_0)(x-x_2)\cdots(x -
x_{n})}{(x_1-x_0)(x_1-x_2)\cdots(x_1 - x_{n})}f(x_1)$  
  $\displaystyle +$ $\displaystyle \cdots +
\frac{(x-x_0)(x-x_1)\cdots(x-
x_{n-1})}{(x_{n}-x_0)(x_{n}-x_1)\cdots(x_{n} - x_{n-1})}f(x_{n})$  
  $\displaystyle =$ $\displaystyle \sum_{i=0}^{n} \left( \prod_{j=0,\; j\neq i}^{n} \frac{x -
x_j}{x...
...^{n} (x - x_j)}{(x - x_i) \prod\limits_{j=0,\;
j\neq i}^{n} (x_i - x_j)} f(x_i)$  
  $\displaystyle =$ $\displaystyle \prod\limits_{j=0}^{n} (x
- x_j) \sum_{i=0}^{n} \frac{ f(x_i)}{ (x - x_i)
\prod\limits_{j=0,\; j\neq i}^{n} (x_i - x_j)}.$  

Note that the expression on the right is a polynomial of degree $ n$ and takes the value $ f(x_i)$ at $ x=x_i$ for $ i=0 , 1,
\cdots, (n-1).$

This polynomial approximation is called LAGRANGE'S INTERPOLATION FORMULA.

Remark 12.3.3   In view of the Remark (12.2.9), we can observe that $ P_{n}(x)$ is another form of Lagrange's Interpolation polynomial formula as obtained above. Also the remainder term $ R_{n+1}$ gives an estimate of error between the true value and the interpolated value of the function.

Remark 12.3.4   We have seen earlier that the divided differences are independent of the order of its arguments. As the Lagrange's formula has been derived using the divided differences, it is not necessary here to have the tabular points in the increasing order. Thus one can use Lagrange's formula even when the points $ x_0,
x_1, \cdots,x_k,\cdots,x_n$ are in any order, which was not possible in the case of Newton's Difference formulae.

Remark 12.3.5   One can also use the Lagrange's Interpolating Formula to compute the value of $ x$ for a given value of $ y=f(x).$ This is done by interchanging the roles of $ x$ and $ y,$ i.e. while using the table of values, we take tabular points as $ y_k$ and nodal points are taken as $ x_k.$

EXAMPLE 12.3.6   Using the following data, find by Lagrange's formula, the value of $ f(x)$ at $ x = 10:$
$ i$ 0 1 2 3 4
$ x_i$ 9.3 9.6 10.2 10.4 10.8
$ y_i = f(x_i)$ 11.40 12.80 14.70 17.00 19.80
Also find the value of $ x$ where $ f(x)=16.00.$
Solution: To compute $ f(10),$ we first calculate the following products:

$\displaystyle \prod\limits_{j=0}^4 (x - x_j)$ $\displaystyle =$ $\displaystyle \prod\limits_{j=0}^4 (10 - x_j)$  
  $\displaystyle =$ $\displaystyle (10-9.3)(10-9.6)(10-10.2)(10-10.4)(10-10.8) = -0.01792,$  
$\displaystyle \prod\limits_{j=1}^4 (x_0 - x_j)$ $\displaystyle =$ $\displaystyle 0.4455, \hspace{.15in}
\prod\limits_{j=0,\; j\neq 1}^n (x_1 - x_j) = -0.1728,
\hspace{.15in} \prod\limits_{j=0,\; j\neq 2}^n (x_2 - x_j) =
0.0648,$  
$\displaystyle \prod\limits_{j=0,\; j\neq 3}^n (x_3 - x_j)$ $\displaystyle =$ $\displaystyle -0.0704,
{\mbox{ and }}
\hspace{.15in} \prod\limits_{j=0,\; j\neq 4}^n (x_4 - x_j) = 0.4320.$  

Thus,
$\displaystyle f(10)$ $\displaystyle \approx$ $\displaystyle -0.0 1792 \times \left[
\frac{11.40}{0.7 \times 0.4455} + \frac{12.80}{0.4 \times
(-0.1728)} + \frac{14.70}{(-0.2)\times 0.0648} \right.$  
    $\displaystyle \hspace{.15in} \left. + \frac{17.00}{(-0.4)\times (-0.0704)} +
\frac{19.80}{(-0.8) \times 0.4320} \right]$  
  $\displaystyle =$ $\displaystyle 13.197845.$  

Now to find the value of $ x$ such that $ f(x)=16,$ we interchange the roles of $ x$ and $ y$ and calculate the following products:
$\displaystyle \prod\limits_{j=0}^4 (y - y_j)$ $\displaystyle =$ $\displaystyle \prod\limits_{j=0}^4 (16 - y_j)$  
  $\displaystyle =$ $\displaystyle (16-11.4)(16-12.8)(16-14.7)(16-17.0)(16-19.8) = 72.7168,$  
$\displaystyle \prod\limits_{j=1}^4 (y_0 - y_j)$ $\displaystyle =$ $\displaystyle 217.3248, \hspace{.15in}
\prod\limits_{j=0,\; j\neq 1}^n (y_1 - y...
... -78.204,
\hspace{.15in} \prod\limits_{j=0,\; j\neq 2}^n (y_2 - y_j) =
73.5471,$  
$\displaystyle \prod\limits_{j=0,\; j\neq 3}^n (y_3 - y_j)$ $\displaystyle =$ $\displaystyle -151.4688,
{\mbox{ and }} \hspace{.15in} \prod\limits_{j=0,\; j\neq 4}^n (y_4 - y_j) =
839.664.$  

Thus,the required value of $ x$ is obtained as:
$\displaystyle x$ $\displaystyle \approx$ $\displaystyle 217.3248 \times \left[
\frac{9.3}{4.6 \times 217.3248} + \frac{9.6}{3.2 \times (-78.204)}
+ \frac{10.2}{1.3\times 73.5471} \right.$  
    $\displaystyle \hspace{.15in}
\left. + \frac{10.40}{(-1.0)\times (-151.4688)} +
\frac{10.80}{(-3.8) \times839.664} \right]$  
  $\displaystyle \approx$ $\displaystyle 10.39123.$  

EXERCISE 12.3.7   The following table gives the data for steam pressure $ P$ vs temperature $ T$ :
$ T$ 360 365 373 383 390
$ P=f(T)$ 154.0 165.0 190.0 210.0 240.0
Compute the pressure at $ T=375.$

EXERCISE 12.3.8   Compute from following table the value of $ y$ for $ x=6.20$ :
$ x$ 5.60 5.90 6.50 6.90 7.20
$ y$ 2.30 1.80 1.35 1.95 2.00
Also find the value of $ x$ where $ y=1.00$

A K Lal 2007-09-12