You have conducted an experiment or done some tests on engineering systems and you now have data. Let us represent the data as (x1, y1), (x2, y2), (x3, y3), …, (xn, yn). Here xk represents the independent variable, the quantity you can adjust and yk is the dependent variable, the data you are going to read from the experimental setup.
What if we want to know the value of the dependent variable corresponding to the value of the independent variable between two recorded data points?
Every physics phenomena or engineering system is described by its underlying mathematical model (equation describing the relation between various quantities).
We can fit a polynomial curve passing through all the data points. Once, you get the polynomial function for the curve you can calculate the value of the dependent variable for any value of the independent variable lying between two recorded data points.
But how do you get the polynomial function for the curve that passes through the given data points?
The procedure for getting the function is called polynomial curve-fitting. And when you calculate the value of the function between two data points it is called Polynomial Interpolation.
represent the polynomial function.
To get the function we need to find out the coefficients of the polynomial. For this let us create a system of n Linear equations, one for each data point.
Let us write this in the matrix form:
The solution of the above linear system will give us the coefficients of the polynomial function.
The coefficient matrix in the above matrix equation is known as the Vandermonde Matrix. The elements in the row of a Vandermonde matrix are in geometric progression.
Let us understand this method of polynomial interpolation by solving an example.
Let us say that an experiment gives us four data points – (1, 4), (2, 19), (3, 60) and (4, 139). We want to the value of dependent variable at 2.5?
Let us fit a cubic polynomial to these data points. Let,
represent the cubic polynomial function. We need to find the coefficients a0, a1, a2 and a3. Since we have four data points we can create a system consisting of four linear equations in four unknowns.
Similarly, we have
Let us now write this in a matrix form:
Solving this we get
Hence, the governing polynomial function for the experiment is given by
Now to find the value of y at x = 2.5, we have
If we want to fit polynomial of higher degree we will need a larger matrix. But a larger matrix will lead to accumulation of round-off errors and the matrix will become ill conditioned. Hence, this method of polynomial interpolation is not used beyond cubic polynomials.
Image provided by the author.
Disclaimer: The opinions expressed within this article are the personal opinions of the author. MyIndMakers is not responsible for the accuracy, completeness, suitability, or validity of any information on this article. All information is provided on an as-is basis. The information, facts or opinions appearing in the article do not reflect the views of MyindMakers and it does not assume any responsibility or liability for the same.