Given n distinct real values x1,x2,…xn and n real values y1,y2,…yn (not necessarily distinct), the Lagrange Interperloation Formula gives a polynomial P with real coefficients satisfying P(xi)=yi for i∈{1,2,…n}.
To describe polynomial P, we first solve the following problem: Given n distinct real values x1,x2,…xn, does there exist a polynomial f with real coefficients satisfying f(x1)=1 and f(xi)=0 for all values of i=1?
By the Remainder-Factor Theorem, if such a polynomial exists, then for all i=1, (x−xi) must be a factor of the polynomial. Consider the polynomial g(x)=i=2∏n(x−xi). This satisfies the conditions g(xi)=0. Now let F=g(x1). Then since F=0 (using the condition that the xi are distinct), we may divide by F to obtain polynomial f(x)=Fg(x). We have f(xi)=Fg(xi)=0 and f(x1)=Fg(x1)=1, giving the polynomial desired.
Let Pj(xj) be the polynomial with real coefficients satisfying Pj(xj)=1 and Pj(xi)=0 for all i=j. Then, P(x)=∑yiPi(x) is a polynomial with real coefficients satisfying P(xi)=yi for all i∈{1,2,…n}.
Worked Examples
1. If we want to find a polynomial that satisfies
P(1)=1,P(2)=4,P(3)=1,P(4)=5,
what are the polynomials P1(x),P2(x),P3(x),P4(x),P(x)?
Let f(x)=(x−2)(x−3)(x−4). Then
f(1)=(−1)(−2)(−3)=−6, so P1(x)=−61(x−2)(x−3)(x−4).
Let f(x)=(x−1)(x−3)(x−4). Then
f(2)=(1)(−1)(−2)=2, so P2(x)=21(x−1)(x−3)(x−4).
Let f(x)=(x−1)(x−2)(x−4). Then
f(3)=(2)(1)(−1)=−2, so P3(x)=−21(x−1)(x−2)(x−4).
Let f(x)=(x−1)(x−2)(x−3). Then
f(4)=(3)(2)(1)=6, so P4(x)=61(x−1)(x−2)(x−3).
Hence,
P(x)=1×(−61)(x−2)(x−3)(x−4)+4×21(x−1)(x−3)(x−4)
+1×(−21)(x−1)(x−2)(x−4)+5×61(x−1)(x−2)(x−3).
2. Show that if we require the polynomial in Lagrange's Interpolation Formula to have degree at most n−1, then there is a unique polynomial satisfying the conditions. Show further that this polynomial is P(x) itself.
Suppose two polynomials R(x) and S(x) satisfy the conditions of Lagrange's Interpolation Formula and have degree at most n−1. Consider the polynomial T(x)=R(x)−S(x). By the conditions, we have T(xi)=R(xi)−S(xi)=yi−yi=0. Hence, by the Remainder-Factor Theorem,, for all values of i, (x−xi) must be a factor of T(x). Since the xi are distinct, we have T(x)=U(x)i=1∏n(x−xi). If U(x) is not the zero polynomial, then the degree on the right hand side is at least n, while the degree on the left hand side is at most n−1, which is a contradiction. Thus, U(x)=0, and so T(x)=0, which gives R(x)=S(x). Hence, there is a unique polynomial which satisfies the conditions in the question. It is clear that each of the Pi(x) has degree at most n−1 (it can have degree 0 if yi=0). Hence, since P(x) is the linear combination of these polynomials, it also has degree at most n−1.
3. Given n distinct complex values x1,x2,…xn and n (not necessarily distinct) complex values y1,y2,…yn, does there exist a polynomial with complex coefficients satisfying P(xi)=yi for all values of i?
Solution: Repeat the above discussion by replacing "real" with "complex". Then P(x)=∑yiPi(x) is a polynomial with complex coefficients.
#Algebra
#LagrangeInterpolation
#KeyTechniques
#Olympiad
Easy Math Editor
This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.
When posting on Brilliant:
*italics*
or_italics_
**bold**
or__bold__
paragraph 1
paragraph 2
[example link](https://brilliant.org)
> This is a quote
\(
...\)
or\[
...\]
to ensure proper formatting.2 \times 3
2^{34}
a_{i-1}
\frac{2}{3}
\sqrt{2}
\sum_{i=1}^3
\sin \theta
\boxed{123}
Comments
@Calvin Lin Many a time I have seen people using Lagrange Multipliers[edit] where I generally use AM-GM. How is that done? And how do we find the next term of 1,2,3,4,5,? be Lagrange Interpolation? Trevor said me that it's something weird which I don't remember. Thanks!
Log in to reply
Lagrange interpolation is about finding a polynomial. AM-GM is Arithemtic Mean - Geometric Mean inequality. I do not see how they are related.
Are you asking about Method of Differences? If so, MOD only works when the values that you are given are consecutive (constant width apart), whereas LI is much more general and works for any set of x values. E.g. find a quadratic polynomial such that f(1)=1,f(2)=2,f(10)=11 would be easy with LI, but hard with MOD.
Log in to reply
Oops! Sorry, it was Lagrange Multipliers not Lagrange Interpolation.
And Trevor once told me that by Lagrange Interpolation, the next term in the sequence 1,2,3,4,5,6, __ is something like π100icos2.9. I don't get how. @Calvin Lin
i only understood a bit of it, can you please elaborate it.....
Log in to reply
Basically, if we want a polynomial running through points a,b,c,d, we need a degree 3 function.
We make a polynomial with 4 "parts"
[p(x−a)(x−b)]+[q(x−a)(x−c)]+[r(x−b)(x−c)]
Note how each part (I've separated them by []) have different 0's. The first part has 0's at x=a,b. Now, we plug in d into the function for x. Notice also how everyother part of the function becomes 0 when plugging in 0.
Let's say we want a function going through (1,2), (2,3), and (3,5)
In this case, a=1, b=2, c=3
y=(x−a)(x−b)+q(x−a)(x−c)+r(x−b)(x−c)
y=p(x−1)(x−2)+q(x−1)(x−3)+r(x−2)(x−3)
Plugging in x=a=1
y=p(1−1)(1−2)+q(1−1)(1−3)+r(1−2)(1−3)
y=p(0)(−1)+q(0)(−2)+r(−1)(−2)
y=2r
Remember, we want our function to go through (1,2), so y=2
2=2r⇒r=1
Now we have
y=p(x−1)(x−2)+q(x−1)(x−3)+1(x−2)(x−3)
Repeating this process for x=2
y=p(2−1)(2−2)+q(2−1)(2−3)+r(2−2)(2−3)
y=p(1)(0)+q(1)(−1)+r(0)(−1)
y=−q
In this case y=3
3=−q⇒q=−3
Now we have
y=p(x−1)(x−2)+(−3)(x−1)(x−3)+1(x−2)(x−3)
Finally, repeating this for x=3, we know that the second and third parts of our eq will be 0 so I won't show those parts.
y=p(2)(1)
We want our function to go through (3,5), so y=5.
5=2p⇒p=25
Thus our function is
y=25(x−1)(x−2)−3(x−1)(x−3)+(x−2)(x−3)
can you please elaborate