Read this lesson as text
Lagrange Interpolation Examples
Numerical Analysis · Axiom Academy
EXAMPLE Lagrange Interpolation Calculation Step-by-step polynomial construction through data points Find the interpolating polynomial through the following data points using Lagrange interpolation, then use it to estimate f(2.5): The Lagrange interpolating polynomial is: Where each Lagrange basis polynomial L_i(x) is: Now we combine using P(x) = y_0 L_0(x) + y_1 L_1(x) + y_2 L_2(x): To find f(2.5), we substitute x = 2.5 into our polynomial: We can verify our polynomial passes through all data points: P(1) = -0.5(1) + 3(1) - 1.5 = 1 P(4) = -0.5(16) + 12 - 1.5 = 2 Based on the example above, which approach is correct?
This is the written version of the interactive lesson above. See the full Numerical Analysis course.