Numerical Interpolation





Introduction

There are two types of calculus (analysis), they are
  1. Analytical Calculus (Analysis)
    Calculus based on continuous function
  2. Numerical Calculus (Analysis)
    Numerical analysis is a branch of mathematics that solves discrete data type problems using numeric approximation. It involves designing methods that give approximate but accurate numeric solutions, which is useful in cases where the exact solution is impossible or data are given in discrete data types.



Interpolation

Interpolation is a type of numerical calculus, a method of constructing new data points within the range of a discrete set of known data points. It is both helpful and convenient to express relations in data with functions. This allows for estimating the dependent variables at values of the independent variables not given in the data, taking (a) functional values (b) derivatives, (c) integrals and (d) differential equations.

So, a process of finding the value of y corresponding to any value of \(x=x_i\) between \(x_0\) and \(x_n\) is called interpolation. It is the technique of estimating the value of a function for any intermediate value of the independent variable.

Interpolation Involves
  1. substitution of new data points
  2. constructing a new data points
  3. discarding unwanted data points
  4. estimating unknown data points
  5. predicting missing or corrupted data points
  6. generating random data points
There are several reasons that justifies the need of Interpolation. Some of them are as follows
  1. we know values at a sample points but function does not exist
  2. function may exist, but we have a discrete data points only
  3. function exist, but formula are very complicated to compute
Interpolation can be done using
  1. Finite differences
  2. Divided differences
  3. Regression Modeling



Finite Differences

Suppose \(y=f( x )\) is tabulated and defined for equally spaced values \( x=x_0+ph \) for p=0,1,2,...,n. Then the values of
\( x=x_0,x_0+h,x_0+2h,...,x_0+nh \)
are given by
\( y=y_0,y_1,y_2,...,y_n\)
In the table form, it is given by
X Y
\( x_0\) \( y_0\)
\( x_0+h\) \( x_1\) \( y_1\)
\( x_0+2h\) \( x_2\) \( y_2\)
\( x_0+3h\) \( x_3\) \( y_3\)
\( x_0+4h\) \( x_4\) \( y_4\)
\( x_0+5h\) \( x_5\) \( y_5\)
\( x_0+6h\) \( x_6\) \( y_6\)
... ... ...
\( x_0+nh\) \( x_n\) \( y_n\)
Now, we can determine values of \( f(x) \) or \( f'(x) \) of integrals for some intermediate values.
To determine values of \( f(x) \) or\( f'(x) \) or integrals for some intermediate values, we use following three types of finite differences.
  1. Forward differences
  2. Backward differences
  3. Central differences
These finite differences deal with change in \(y\) (dependent variable) due to finite changes in\(x\)(independent variable).


Forward Differences

Suppose \(y=f( x )\) is tabulated for equally spaced valued \( x=x_0+ph \) for p=0,1,2,...,n for the entries
\( x=x_0,x_0+h,x_0+2h,...,x_0+nh \)
with the values
\( y=y_0,y_1,y_2,...,y_n\)
Then, the first forward differences are defined by
\( \Delta y_0 =y_1 -y_0\)
\( \Delta y_1 =y_2 -y_1\)
\( \Delta y_2 =y_3 -y_2\)
Similarly
\( \Delta y_{i-1} =y_{i} -y_{i-1} \) for \( i=1,2,\ldots ,n\)
Here,
\( \Delta\) is forward difference operator
Again,
The second forward differences are defined by
\(\Delta^2 y_0 =\Delta y_1 -\Delta y_0 \)
\(\Delta^2 y_1 =\Delta y_2 -\Delta y_1 \)
\(\Delta^2 y_2 =\Delta y_3 -\Delta y_2 \)
Similarly
\(\Delta^2 y_{i-1} =\Delta y_i -\Delta y_{i-1} \) for \( i=1,2,\ldots ,n\)
Similarly, we can define third, fourth and higher forward differences.
The table below shows forward differences up to 6th order

X Y 1st diff 2nd diff 3rd diff 4th diff 5th diff 6th diff
\( x_0\) \( y_0\)
\( \Delta y_0\)
\( x_1\) \( y_1\) \( \Delta^2 y_0\)
\( \Delta y_1\) \( \Delta^3 y_0\)
\( x_2\) \( y_2\) \( \Delta^2 y_1\) \( \Delta^4 y_0\)
\( \Delta y_2\) \( \Delta^3 y_1\) \( \Delta^5 y_0\)
\( x_3\) \( y_3\) \( \Delta^2 y_2\) \( \Delta^4 y_1\) \( \Delta^6 y_0\)
\( \Delta y_3\) \( \Delta^3 y_2\) \( \Delta^5 y_1 \)
\( x_4\) \( y_4\) \( \Delta^2 y_3\) \( \Delta^4 y_2\)
\( \Delta y_4\) \( \Delta^3 y_3\)
\( x_5\) \( x_5\) \( \Delta^2 y_4\)
\( \Delta y_5\)
\( x_6\) \( x_6\)

Note

  1. \(x\) is called argument
  2. \(y\) is called function of entry
  3. \(y_0\), the first entry is called leading term
  4. differences\( \Delta {y_0},\Delta^2 y_0,\Delta^3y_0,\ldots \) are leading differences

Example 1

Compute the difference table based on the values by
\( y( 0 )=1,y( 1 )=0,y( 2 )=1\) and\(y( 3 )=10\)

Solution
According to given set of data values, the difference table are given as below

X Y 1st diff 2nd diff 3rd diff
0 1
-1
1 0
2
1
6
2 1 8
9
3 10



Backward Differences

Suppose \(y=f( x )\) is tabulated for equally spaced valued \( x=x_0+ph \) for p=0,1,2,...,n for the entries
\( x=x_0,x_0+h,x_0+2h,...,x_0+nh \)
with the values
\( y=y_0,y_1,y_2,...,y_n\)
Then, the first backward differences are defined by
\( \nabla y_1 =y_1 -y_0 \)
\( \nabla y_2 =y_2 -y_1 \)
\( \nabla y_3 =y_3 -y_2 \)
Similarly
\( \nabla y_i =y_{i} -y_{i-1} \) for \( i=1,2,\ldots ,n\)
Here,
\( \nabla\) is backward difference operator
Again,
The second backward differences are defined by
\(\nabla^2 y_1 =\nabla y_1 -\nabla y_0 \)
\(\nabla^2 y_2 =\nabla y_2 -\nabla y_1 \)
\(\nabla^2 y_3 =\nabla y_3 -\nabla y_2 \)
Similarly
\(\nabla^2 y_i =\nabla y_i -\nabla y_{i-1} \) for \( i=1,2,\ldots ,n\)
Similarly, we can define third, fourth and other higher backward differences.
The table below shows backward differences up to 4th order

X Y 1st diff 2nd diff 3rd diff 4th diff
\( x_0\) \( y_0\)
\( \nabla y_1\)
\( x_1\) \( y_1\) \( \nabla^2 y_2\)
\( \nabla y_2\) \( \nabla^3 y_3\)
\( x_2\) \( y_2\) \(\nabla^2 y_3\) \( \nabla^4 y_4\)
\( \nabla y_3\) \( \nabla^3 y_4\)
\( x_3\) \( y_3\) \( \nabla^2 y_4\)
\( \nabla y_4\)
\( x_4\) \( y_4\)
Note
In the difference table
  1. \(x\) is called argument
  2. \(y\) is called function of entry
  3. \({y_n}\), the first entry is called leading term
  4. differences\( \nabla y_n,\nabla^2 y_n ,\nabla^3 y_n,\ldots \) are leading differences

Example 1

Compute the difference table based on the values by
\( y( 0 )=1,y( 1 )=0,y( 2 )=1\) and\(y( 3 )=10\)

Solution
According to given set of data values, the difference table are given as below

X Y 1st diff 2nd diff 3rd diff
0 1
-1
1 0
2
1 6
2 1 8
9
3 10



Central Differences

Suppose \(y=f( x )\) is tabulated for equally spaced valued for the entries
\( x=...,x_0-2h,x_0-h,x_0,x_0+h,x_0+2h,...\)
with the values
\( y=...,y_{-2},y_{-1},y_0,y_1,y_2,...\)
Then, first central the differences are defined by
\( \delta y_{\frac{1}{2}}=y_1-y_0\)
\( \delta y_{\frac{3}{2}}=y_2-y_1\)
\( \delta y_{\frac{5}{2}}=y_3-y_2\)
Similalry
\( \delta y_{i-\frac{1}{2}}=y_i-y_{i-1}\) for \( i=1,2,\ldots ,n\)
Here \( \delta \) is central difference operator
Again,
The second central differences are defined by by
\( \delta^2 y_{\frac{1}{2}}= \delta y_1 -\delta y_0 \)
\( \delta^2 y_{\frac{3}{2}}= \delta y_2 -\delta y_1 \)
\( \delta^2 y_{\frac{5}{2}}= \delta y_3 -\delta y_2 \)
Similarly
\( \delta^2 y_{i-\frac{1}{2}}= \delta y_i -\delta y_{i-1} \) for \( i=1,2,\ldots ,n\)
Similarly, we can define third, fourth and other higher central differences.
The table below shows central differences up to 4th order

X Y 1st diff 2nd diff 3rd diff 4th diff
\( x_{-2}\) \( y_{-2}\)
\( \delta y_{-\frac{3}{2}}\)
\( x_{-1}\) \( y_{-1}\) \( \delta^2 y_{-1}\)
\( \delta y_{-\frac{1}{2}}\) \( \delta^3 y_{-\frac{1}{2}}\)
\( x_0\) \( y_0\) \(\delta^2 y_0\) \( \delta^4 y_0\)
\( \delta y_{\frac{1}{2}}\) \( \delta^3 y_{\frac{1}{2}}\)
\( x_{1}\) \( y_1\) \( \delta^2 y_1\)
\( \delta y_{\frac{3}{2}}\)
\( x_2\) \( y_2\)

Note
In the difference table

  1. \(x\) is called argument
  2. \(y\) is called function of entry
  3. \({y_0}\), the first entry is called leading term
  4. differences\( \delta_{y_0},\delta^2_{y_0},\delta^3_{y_0},\ldots \) are leading differences

Example 1

In the table below, values of y are consecutive terms of a series. Compute the diference table.

3 4 5 6 7 8 9
2.7 6.4 12.5 21.6 34.3 51.2 72.9

Solution
According to given set of data values, the difference table is given below

X Y 1st diff 2nd diff 3rd diff
3 2.7

3.7
4 6.4 2.4
6.1 0.6
5 12.5 3
9.1 0.6
6 21.6 3.6
12.7 0.6
7 34.3 4.2
16.9 0.6
8 51.2 4.8
21.7
9 72.9



Polynomial of degree n

Prove that nth difference of a polynomial of degree n is constant.
Proof
Let\(y=f( x )\) be a polynomial of nth degree given by
\( y( x )=a_nx^n+a_{n-1}x^{n-1}+a_{n-2}x^{n-2}+\ldots +a_1x+a_0\)
Then
\( y( x+h )=a_n(x+h)^n+a_{n-1}(x+h)^{n-1}+a_{n-2}(x+h)^{n-2}+\ldots +a_1(x+h)+a_0\)
Now
\( y( x+h )-y( x )=a_n[ {{( x+h )}^{n}}-x^n ] +a_{n-1}[ {{( x+h )}^{n-1}}-x^{n-1} ]+\ldots +a_1h\)
Without loss of generality, we can re-write the polynomial in terms
\( \Delta y( x )=b_{n-1}x^{n-1}+b_{n-2}x^{n-2}+\ldots +b_1 x+b_0\)
This shows that,
first difference of a polynomial of degree n is polynomial of degree (n-1)
Similarly,
second difference of a polynomial of degree n is a polynomial of degree (n-1)
Thus,
nth difference of a polynomial of degree n is constant.
Conversely,
if nth differences of tabulated functions are constants and all higher order differences vanish, then tabulated functions represents a polynomial of degree n.
This completes the proof.

No comments:

Post a Comment