![]() |
VOOZH | about |
A quadratic polynomial is used in the mathematical process of quadratic interpolation to estimate values between data points. When you have a set of three data points and wish to estimate the behaviour of a smooth curve passing through these points, you frequently use this formula. To try to predict intermediate values, the quadratic interpolation method assumes that the fundamental connection between the points follows a parabolic curve (a second-degree polynomial).
Table of Content
Interpolation is a mathematical method used to estimate unknown values that fall within the range of known data points. Many fields, including mathematics, computer graphics, engineering, data analysis, and scientific computing, often employ interpolation. Using known data points as a point of reference is a mathematical and computational technique for estimating values.
It is often utilized when we need to calculate the value of an equation at points located between the given data points and we have a set of data points. Common interpolation techniques include:
Using three known data points and a mathematical technique called quadratic interpolation, one can figure out the value of a function that is unidentified at a given location. It depends on the idea that the underlying connection between the information sets follows a parabolic curve, which is modelled by a quadratic equation.
General form of a quadratic equation is: y = ax2 + bx + c
Three data points—(x₀, y₀), (x₁, y₁), and (x₂, y₂)—each consisting of an x-value and its associated y-value—are necessary in order to apply quadratic interpolation. You may generate a quadratic equation that matches the curve that passes through these data points using these points as the starting point. The quadratic interpolation formula is shown in the image added below:
Given three known data points (x₀, y₀), (x₁, y₁), and (x₂, y₂), each of which is composed of an x-value and its corresponding y-value, the quadratic interpolation method is used to obtain an estimated value, y, at a given x-value, x. The quadratic Equation required is given as follows:
y = y0 × L0(x) + y1 × L1(x) + y2 × L2(x)
where,
Lagrange basis polynomials are defined as:
L₀(x) = (x - x₁) × (x - x₂) / ((x₀ - x₁) × (x₀ - x₂))
L₁(x) = (x - x₀) × (x - x₂) / ((x₁ - x₀) × (x₁ - x₂))
L₂(x) = (x - x₀) × (x - x₁) / ((x₂ - x₀) × (x₂ - x₁))
We assume that we have three data points (x0, y0), (x1, y1), and (x2, y2) and that we are attempting to find a quadratic function that passes across these points in order to develop the quadratic interpolation formula. The form of the quadratic function is:
f(x) = ax2 + bx + c
To fit the function to the provided data points, we need to identify the values of coefficients a, b, and c. Three mathematical equations based on the data points can be constructed to do this:
Now, solve this system of three equations to find the values of coefficients a, b, and c.
Step 1: Simplifying the equations
Expand the equations:
- y0 = ax02 + bx0 + c
- y1 = ax12 + bx1 + c
- y2 = ax22 + bx2 + c
Step 2: Eliminate c from the equations
Subtract the first equation from the second equation and the first equation from the third equation:
- y0 - y1 = ax02 + bx0 + c - (ax12 + bx1 + c)
- y0 - y2 = ax02 + bx0 + c - (ax22 + bx2 + c)
This simplifies to:
- y0 - y1 = a(x02 - x12) + b(x0 - x1) . . . (1)
- y0 - y2 = a(x02 - x22) + b(x0 - x2) . . . (1)
Step 3: Calculating a
Multiply the first equation by (x0 - x2) and the second equation by (x0 - x1) to eliminate b:
a(x02 - x12)(x0 - x2) + b(x0 - x1)(x0 - x1) = (y0 - y1)(x0 - x2)
a(x02 - x22)(x0 - x1) + b(x0 - x1)(x0 - x2) = (y0 - y2)(x0 - x1)
Now, subtract the second equation from the first equation to eliminate b:
a(x02 - x12)(x0 - x2) - a(x02 - x22)(x0 - x1) = (y0 - y1)(x0 - x2) - (y0 - y2)(x0 - x1)
Step 4: Solving for a
Now, factor out a from both sides:
a[(x02 - x12)(x0 - x2) - (x02 - x22)(x0 - x1)] = (y0 - y1)(x0 - x2) - (y0 - y2)(x0 - x1)
Now, dividing both sides by [(x02 - x12)(x0 - x2) - (x02 - x22)(x0 - x1)] to get the value of a.
a = [(y0 - y1)(x0 - x2) - (y0 - y2)(x0 - x1)]/[(x02 - x12)(x0 - x2) - (x02 - x22)(x0 - x1)]
Step 5: Calculating b
Now find the value of b by substituting the value of a in the original equation.
Step 6: Calculating c
After you have found the values of a and b, you can find c by substituting them back into any of the original equation:
c = y0 - ax02 - bx0
Now you have the coefficients a, b, and c, which represent the quadratic function that passes through the given data points (x0, y0), (x1, y1), and (x2, y2).
Some of its applications are as follows:
Learn more about, Uses of Interpolation
Quadratic Interpolation has some limitations, which are listed as follows:
Problem 1: Suppose we have the following three data points: (x₀, y₀) = (1, 5) (x₁, y₁) = (2, 12) (x₂, y₂) = (3, 23)
Now, let's use quadratic interpolation to estimate the value of y at x = 2.5.
Solution:
First, we calculate the Lagrange basis polynomials:
L₀(2.5) = (2.5 - 2) × (2.5 - 3) / ((1 - 2) × (1 - 3)) = 0.75,
L₁(2.5) = (2.5 - 1) × (2.5 - 3) / ((2 - 1) × (2 - 3)) = -1.5, and
L₂(2.5) = (2.5 - 1) × (2.5 - 2) / ((3 - 1) × (3 - 2)) = 0.75.
Now, applying quadratic interpolation formula:
y = y₀ × L₀(2.5) + y₁ × L₁(2.5) + y₂ × L₂(2.5) y
⇒ y = 5 × 0.75 + 12 × (-1.5) + 23 × 0.75 y
⇒ y = 3.75 - 18 + 17.25 y
⇒ y = 2
So, the estimated value of y at x = 2.5 is 2.
Problem 2: Given the following data points: (x₀, y₀) = (1, 3) (x₁, y₁) = (4, 24) (x₂, y₂) = (7, 67)
Let's estimate the value of y at x = 5.
Solution:
Calculating the Lagrange basis polynomials:
L₀(5) = (5 - 4) × (5 - 7) / ((1 - 4) × (1 - 7)) = -1
L₁(5) = (5 - 1) × (5 - 7) / ((4 - 1) × (4 - 7)) = 2
L₂(5) = (5 - 1) × (5 - 4) / ((7 - 1) × (7 - 4)) = 3/8
Applying the quadratic interpolation formula:
y = y₀ × L₀(5) + y₁ × L₁(5) + y₂ × L₂(5) y
⇒ y = 3 × (-1) + 24 × 2 + 67 × 3/8 y
⇒ y = -3 + 48 + 25.125 y
⇒ y = 70.125
So, the estimated value of y at x = 5 is approximately 70.125.
Problem 3: Given the following data points: (x₀, y₀) = (1, 3) (x₁, y₁) = (2, 8) (x₂, y₂) = (3, 15)
Let's estimate the value of y at x = 1.5.
Solution:
Firstly, calculating the Lagrange basis polynomials:
L₀(1.5) = (1.5 - 2) × (1.5 - 3) / ((1 - 2) × (1 - 3)) = 0.75
L₁(1.5) = (1.5 - 1) × (1.5 - 3) / ((2 - 1) × (2 - 3)) = -0.75
L₂(1.5) = (1.5 - 1) × (1.5 - 2) / ((3 - 1) × (3 - 2)) = 0.25
Then, applying the quadratic interpolation formula:
y = y₀ × L₀(1.5) + y₁ × L₁(1.5) + y₂ × L₂(1.5) y
⇒ y = 3 × 0.75 + 8 × (-0.75) + 15 × 0.25 y
⇒ y = 2.25 - 6 + 3.75 y
⇒ y = 0
So, the estimated value of y at x = 1.5 is 0.
Problem 4: Given the following data points: (x₀, y₀) = (0, 1) (x₁, y₁) = (2, 3) (x₂, y₂) = (5, 6)
Let's estimate the value of y at x = 3.
Solution:
Again repeating the same steps,
Firstly, calculate the Lagrange basis polynomials:
L₀(3) = (3 - 2) × (3 - 5) / ((0 - 2) × (0 - 5)) = 1/10
L₁(3) = (3 - 0) × (3 - 5) / ((2 - 0) × (2 - 5)) = -3/10
L₂(3) = (3 - 0) × (3 - 2) / ((5 - 0) × (5 - 2)) = 3/10
Now, applying the quadratic interpolation formula:
y = y₀ × L₀(3) + y₁ × L₁(3) + y₂ × L₂(3) y
⇒ y 1 × 1/10 + 3 × (-3/10) + 6 × 3/10 y
⇒ y = 0.1 - 0.9 + 1.8 y
⇒ y = 1
So, the estimated value of y at x = 3 is 1.
Problem 5: Given the following data points: (x₀, y₀) = (-2, 4) (x₁, y₁) = (0, 1) (x₂, y₂) = (1, -1)
Let's estimate the value of y at x = -1.
Solution:
Calculating the Lagrange basis polynomials:
L₀(-1) = (-1 - 0) × (-1 - 1) / ((-2 - 0) × (-2 - 1)) = 1/6
L₁(-1) = (-1 - (-2)) × (-1 - 1) / ((0 - (-2)) × (0 - 1)) = -1/2
L₂(-1) = (-1 - (-2)) × (-1 - 0) / ((1 - (-2)) × (1 - 0)) = 1/3
Apply the quadratic interpolation formula:
y = y₀ × L₀(-1) + y₁ × L₁(-1) + y₂ × L₂(-1) y
⇒ y = 4 × 1/6 + 1 × (-1/2) + (-1) × 1/3 y
⇒ y = 2/3 - 1/2 - 1/3 y
⇒ y = 0
So, the estimated value of y at x = -1 is approximately 0.
Q1. Given three data points (1,2), (2,3), and (3,5), use quadratic interpolation to estimate the value at x = 2.5.
Q2. Given three data points (0,1), (1,3), and (2,2), determine the quadratic equation that passes through these points and use it to find the value at x=1.5.
Q3. If you have the data points (1,4), (2,7), and (3,6) what is the quadratic function that fits these points? Estimate the value at x = 2.2
Q4. Given the points (2,5), (3,9), and (5,15) perform quadratic interpolation to find the polynomial and use it to estimate the value at x = 4