Last Updated on May 19, 2024 by Maged kamel

- Solved problems for quadratic interpolation using the vandermonde matrix.
- Solved problem 1/2 of the solved problems for quadratic interpolation.
- Solved problem 2/2 of the solved problems for quadratic interpolation.
- The values of b11,b21, and b31 of the first column of matrix B.
- The values of b12,b22, and b23 of the second column of matrix B.
- The values of b13,b23, and b33 of the third column of matrix B.
- The values of a0,a1, and a2.
- The final expression of quadratic interpolation is P(x) and the value of P(PI/12).

## Solved problems for quadratic interpolation using the vandermonde matrix.

Two solved problems for quadratic interpolation are introduced by using the given three points and the corresponding y values to get the coefficients a_{0},a_{1}, and a_{2}. And then, we can write the quadratic polynomial expression as P(x)=a_{0}+a_{1}x+a_{2}x2.

The last step is multiplying the inverse matrix V-1 by the X-X matrix to find the value of the factor column vector.

We ultimately obtained these values, as shown in the last slide image.

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 a_{0},a_{1}, and a_{2}.y is the column vector of y values for the three points.

This is the final value for the coefficients. For more details, please refer to the previous post to learn 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.

### 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-point x and y value and check the P(x) value of x=2.70.

#### The values of b_{11},b_{12}, and b_{13} of the first row of matrix B.

The first step is to find the value of coefficients a_{0},a_{1}, and a_{2} by substituting the corresponding elements of the B matrix, considering x_{0}=1, y_{0}=3, x_{1}=2, y_{1}=5, and x_{2}=3 and y_{2}=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.

#### The values of b_{21},b_{22}, and b_{23} of the second row of matrix B.

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

#### The values of b_{31},b_{32}, and_{ }b_{32} of the third row of matrix B.

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

#### The values of a_{0},a_{1}, and a_{2} for solved example-1.

Once we have written the three rows of matrix B, we will multiply matrix B by the vector matrix ( y_{0},y_{1},y_{2}). The product will give the corresponding values of the coefficients: a_{0}=2, a_{1}=1/2, and a_{2}=1/2.

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

The quadratic polynomial can be written as P(x)=a0+a1x+a2*x2. The last step is to find the point p with coordinate x=2.70. P(2.707) will be 6.995. Please check the next slide image for more details.

### 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-point x and y value and check the P(x) value of x=pi/12.

The function is f(x)=(sin x+cos x). the given x values are x_{0}=10 degrees, x_{1}=20 degrees and x_{2}=30 degrees. The first step is to find the value of coefficients a_{0},a_{1}, and a_{2} by substituting the corresponding elements of the B matrix.

After converting the values in degrees to the corresponding values in radians.consider x_{0}=0.1745, y_{0}=1.1585, x_{1}=0.3491, y_{1}=1.2817, and x_{2}=0.5236 and y_{2}=1.3660.

#### The values of b_{11},b_{21}, and_{ }b_{31} 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 values of b_{12},b_{22}, and_{ }b_{23} 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 values of b_{13},b_{23}, and_{ }b_{33} of the third column of matrix B.

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

#### The values of a_{0},a_{1}, and a_{2}.

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 ( y_{0},y_{1},y_{2}). The product will give the corresponding value of the coefficients as follows:

a_{0}=0.9968, a_{1}=1.0176 and a_{2}=-0.6009.

#### The final expression of quadratic interpolation is P(x) and the value of P(PI/12).

The quadratic polynomial can be written as P(x)=a0+a1x+a2*x2. The last step is to find P(pi/12), which will be=1.222.

The original function’s corresponding value of Pi/12 is obtained by writing sin (pi/12)+ cos(pi/12)=1.2247, which has little difference from the quadratic polynomial value.

This links to post 9, titled How to Use a Matrix for the Quadratic Function?

The previous post 2a– Easy introduction to quadratic interpolation.

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