
Arturo O. answered 04/18/17
Tutor
5.0
(66)
Experienced Physics Teacher for Physics Tutoring
If you only have 2 points, the Lagrange interpolating polynomial will give the equation of a straight line. Recall that the degree of the Lagrange interpolating polynomial is 1 lower than the number of points. It is difficult to write the equations in this window, but here goes my attempt.
P(x) = Σj=1n Pj(x)
Pj(x) = yjΠk=1,k≠jn (x - xk)/(xj - xk)
x1 = 2
x2 = 5
y1 = 4
y2 = 1
P1(x) = y1(x - x2)/(x1 - x2) = 4(x - 5)/(2 - 5) = -(4/3)(x - 5)
P2(x) = y2(x - x1)/(x2 - x1) = 1(x - 2)/(5 - 2) = (1/3)(x - 2)
P(x) = P1(x) + P2(x) = [-(4/3)(x - 5)] + [(1/3)(x - 2)] = -x + 6
Note that in this problem with only two points, y = P(x) is just the equation of a straight line that goes through the two given points.