Description
In today’s class, we continued Lagrange polynomials, which provide us with a way of finding
the polynomial of degree n − 1 that goes through n points. The example we did today
was three points to find a degree 3 polynomial (a quadratic). For a reminder, the Lagrange
polynomial is constructed from basis polynomials, denoted as ℓi(x). It is
L(x) = y1ℓ1(x) + y2ℓ2(x) + . . . + ynℓn(x).
These basis elements are constructed from only the x-values of the points. They are defined
as multiplying the following terms:
x − xm
xi − xm
where m never equals i. The notation used in math is
ℓi(x) = Y
m,m̸=i
x − xm
xi − xm
.
That big pi-looking symbol means multiply all the terms.
The example we did in class was with the points {(−2, −8),(−1, −1),(1, 1),(2, 8)}. So we
will use the index i for the first point, 2 for the second, and 3 for the third. This means:
i xi yi
1 −2 −8
2 −1 −1
3 1 1
4 2 8
When we compute the basis elements, we compute the following:
• ℓ1(x) =
x+1
−2+1
x−1
−2+1
x−2
−2−2
= −
1
12 (x
3 − 2x
2 − x + 2)
• ℓ2(x) =
x+2
−1+2
x−1
−1−1
x−8
−1−2
=
1
6
(x
3 − x
2 − 4x + 4)
• ℓ3(x) =
x+2
1+2
x+1
1+1
x−2
1−2
= −
1
6
(x
3 + x
2 − 4x − 4)
• ℓ3(x) =
x+2
2+2
x+1
2+1
x−1
2−1
=
1
12 (x
3 + 2x
2 − x − 2)
To construct the Lagrange polynomial, we now multiply each basis polynomial by its corresponding yi value:
L(x) = −8ℓ1(x)−1ℓ2(x) + 1ℓ3(x) + 2ℓ4(x)
= x
3
We see that we get a degree 3 polynomial. Let’s check that it works with our points and
even graph our points with the function
−2 −1 1 2 −8
−1
1
8
x
L(x)
Now, I would like you to repeat the same procedure with the following points.
1. Find the cubic polynomial that passes through (0, 3),(−1, 2),(2, 11),(1, 4) using the
method of Lagrange polynomials illustrated in the example above.