UNO High School Problem of the Week Competition
Problem 5
Given two points (x0,y0) and (x1,y1), we can construct a function that passes through
them by solving the following system of equations:
a1x0 + a0 = y0
a1x1 + a0 = y1
for a0 and a1.
Simliarly for three points (x0,y0), (x1,y1), and (x2,y2) by solving
a2x02 + a1x0 + a0 = y0
a2x12 + a1x1 + a0 = y1
a2x22 + a1x2 + a0 = y2
for a0, a1, and a2.
This process can be done with any number of points and is known as interpolation.
The resulting polynomial is called the interpolating polynomial.
Determine the interpolating polynomial that passes through the following points (1,1), (2,10), (3,6), (-1,-2).
Use the interpolating polynomial to determine f(0), f(-2), and f(-3).
Solution
We can construct the function f(x) in the following manner:
f(x) = [(x-x1)(x-x2)(x-x3)/(x0-x1)(x0-x2)(x0-x3)]f(x0) +
[(x-x0)(x-x2)(x-x3)/(x1-x0)(x1-x2)(x1-x3)]f(x1) +
[(x-x0)(x-x1)(x-x3)/(x2-x0)(x2-x1)(x2-x3)]f(x2) +
[(x-x0)(x-x1)(x-x2)/(x3-x0)(x3-x1)(x3-x2)]f(x3)
as long as all of the x values are distinct.
Looking at the above function, we see that it satisfies the given points as f( x0 ) = f( x0 ) + 0 + 0 + 0,
f( x1 ) = 0 + f( x1 ) + 0 + 0, f( x2 ) = 0 + 0 + f( x2 ), and f( x3 ) = 0 + 0 + 0 + f( x3 ).
Let x0 = 1, x1 = 2, x2 = 3, and x3 = -1
If we substitute in the x values, expand and simplify, we get that
f(x) = (-9x3 + 28x2 + 15x - 30)/4
Now we can easily determine that f(0) = -15/4, f(-2) = 31, f(-3) = 105.
Alternate Solution
As we are given 4 points, the desired polynomial must have a degree of at most 3. Thus we have,
f(x) = a3x3 + a2x2 + a1x + a0
Using the given points, we get the following system of equations.
a3(1)3 + a2(1)2 + a1(1) + a0 = 1
a3(2)3 + a2(2)2 + a1(2) + a0 = 10
a3(3)3 + a2(3)2 + a1(3) + a0 = 6
a3(-1)3 + a2(-1)2 + a1(-1) + a0 = -2
which upon simplifying yields
a3 + a2 + a1 + a0 = 1
8a3 + 4a2 + 2a1 + a0 = 10
27a3 + 9a2 + 3a1 + a0 = 6
-a3 + a2 - a1 + a0 = -2
Now any method for solving a system of linear equations can be used to solve for the constants a3, a2, a1, and a0.
Using the matrix equation approach, we see that a3 = 9/4, a2 = 7, a1 = 15/4, a0 -2.
Thus f(x) = -(9/4)x3 + 7x2 + (15/4)x - 15/2 and using this closed form, we can see that f(0) = -15/2, f(-2) = 31, f(-3) = 105.