brief illustration - post 2b-numerical-interpolation

2b- Solved problems for quadratic interpolation

Spread the love

Solved problems for quadratic interpolation.

Two solved problems for quadratic interpolation are introduced by using the given three points and the corresponding y values to get the coefficients a0,a1, and a2. And then, we can write the quadratic polynomial expression as P(x)=a0+a1x+a2x2.

The last step is the multiply the inverse matrix V-1 by the X- X-matrix to find the value of the factor column vector. In the end, we obtained these values, as shown in the last slide image.

Introduction to quadratic interpolation.

These equations can be written in a matrix form. The Form of V*X=Y is to be used, where V is the Vandermonde matrix, and the column vector for the coefficients of a0,a1, and a2.y is the column vector of y values for the three points.

Three polynomial equation for quadratic interpolation

This is the final value for the coefficients, for more details please refer to the previous post to learn about how to derive this expression. The matrix b is formed with 3×3 and the different factors for all the rows and columns are shown in the next slide image.

The values of a0,a1,and a2 for the quadratic interpolation polynomial.

Solved problem 1/2 of the solved problems for quadratic interpolation.

It is required to derive an expression for the quadratic polynomial for a given three points x and y values and to check the P(x) value of x=2.70.

The values of b11,b12, b13 of the first row of matrix B.

The first step is to find the value of coefficients a0,a1, and a2 by substituting the corresponding elements of the B matrix, considering x0=1, y0=3, x1=2, y1=5, and x2=3 and y2=8. All the rows have different x0,x1,x2, and fractions values.

The next slide image explains the values of the first row of matrix B.

Solved problem#1 of the two solved problems for quadratic interpolation

The values of b21,b22, and b23 of the second row of matrix B.

The next slide image are explaining the values of the second row of matrix B.

Solved problem-1. second-row expression.

The values of b31,b32, and b32 of the third row of matrix B.

.The next slide image are explaining the values of the third row of matrix B.

Solved problem-1. third-row expression.

The values of a0,a1, and a2.

Once we have written the three rows of matrix B, we will multiply matrix B by the vector matrix ( y0,y1,y2). The product will give the corresponding value of the coefficients as follows: a0=2, a1=1/2, and a2=1/2.

The final expression of P(x)and the value of P(2.707).

The quadratic polynomial can be written in the form of P(x)=a0+a1x+a2*x2. The last step is to find P(2.707) which will be=6.995. please check the next slide image for more details.

Solved problem#1- Final quadratic polynomial expression.

Solved problem 2/2 of the solved problems for quadratic interpolation.

It is required to derive an expression for the quadratic polynomial, using quadratic interpolation for a given three points x and y values, and to check the P(x) value of x=pi/12.

The given function is (sin x+cos x). the given x values are x0=10 degrees, x1=20 degrees and x2=30 degrees. The first step is to find the value of coefficients a0,a1, and a2 by substituting the corresponding elements of the B matrix.

After converting the values in degrees to the corresponding values in radians.consider x0=0.1745, y0=1.1585, x1=0.3491, y1=1.2817, and x2=0.5236 and y2=1.3660.

Solved problem#2 of the two solved problems for quadratic interpolation.

The values of b11,b21, and b31 of the first column of matrix B.

The next slide image explains the values of the first column of matrix B and the values of the different elements.

The value of the first column of B matrix.

The values of b12,b22, and b23 of the second column of matrix B.

The next slide image explains the values of the second column of matrix B and the values of the different elements.

The value of the second column of B matrix.

The values of b13,b23, and b33 of the third column of matrix B.

The next slide image are explaining the values of the third column of matrix B and the values of the different elements.

The value of the third column of B matrix.

The values of a0,a1, and a2.

Once we have written the three rows or columns as we have done in this example, of matrix B, we will multiply matrix B by the vector matrix ( y0,y1,y2). the product will give the corresponding value of the coefficients as follows:

a0=0.9968, a1=1.0176 and a2=-0.6009.

The final expression of P(x)and the value of P(pi/12).

The quadratic polynomial can be written in the form of P(x)=a0+a1x+a2*x2. The last step is to find P(pi/12) which will be=1.222. The corresponding value of Pi/12 for the original function is obtained by writing sin (pi/12)+ cos(pi/12)=1.2247, which has little difference from the quadratic polynomial value.

This is a link to a post that has the title How to Use a matrix for the quadratic function?

This is a link to the PDF file used to illustrate this post.

The next post is Introduction to Newton-divided difference interpolation.

Scroll to Top