Interpolation

Interpolation

Interpolation is a method of fitting the data points to represent the value of a function. It has various number of application in engineering and science, that are used to construct new data points within the range of discrete set of known data points or cna be used for determining a formula of the function that will pass from the given set of points (x,y).

As an example, consider defining.

\(x_{0}=0\)

\(x_{1}=\frac{\pi }{4}\)

\(x_{2}=\frac{\pi }{2}\)

And

\(y_{i}= cosx_{i}\)

i = 0,1,2

This gives us the three points

\(\left ( 0,1 \right )\)

\(\left ( \frac{\pi}{4},\frac{1}{\sqrt{2}} \right )\)

\(\left ( \frac{\pi }{2},0 \right )\)

Now finding a quadratic polynomial that will contain the points-

\(p\left ( x \right )=a_{0}+a_{1}x+a_{2}^{x2}\)

For which

\(p\left ( xi \right )=yi\)

\(i=0,1,2\)

The graph of this polynomial is shown on the accompanying graph. We later give an explicit formula.

PURPOSES OF INTERPOLATION

Replace a set of data points \(\left \{ \left ( xi,yi \right ) \right \}\) with a function given analytically.

Approximate functions with simpler ones, usually polynomials or ‘piecewise polynomials’.

Purpose 1 has several aspects-

The data may be from a known class of functions. Interpolation is then used to find the member of this class of functions that agrees with the given data. For example, data may be generated from functions of the form

\(p\left ( x \right )=a_{0}+a_{1^{e^{x}}}+a_{2}e^{2x}+…+a_{n}e^{nx}\)

Then we need to find the coefficients \(\left \{ aj \right \}\) based on the given data values.

We may want to take function values f(x) given in a table for selected values of x, often equally spaced, and extend the function to values of x not in the table. For example, given numbers from a table of logarithms, estimate the logarithm of a number x not in the table.

Given a set of data points \(\left \{ \left ( xi, yi \right ) \right \}\) , find a curve passing thru these points that is “pleasing to the eye”. In fact, this is what is done continually with computer graphics. How do we connect a set of points to make a smooth curve? Connecting them with straight line segments will often give a curve with many corners, whereas what was intended was a smooth curve.

Purpose 2 for Interpolation

Is to approximate functions f(x) by simpler functions p(x), perhaps to make it easier to integrate or differentiate f(x). That will be the primary reason for studying interpolation in this course.

As as example of why this is important, consider the problem of evaluating

\(i=\int_{0}^{1} \frac{dx}{1+x^{10}}\)

This is very difficult to do analytically. But we will look at producing polynomial interpolants of the integrand and polynomials are easily integrated exactly.