Worked Example: Worked Mathematical Example: Lagrange Interpolation
Interpolate y(x*) through 3 points using Lagrange basis polynomials L₀(x), L₁(x), L₂(x).
- Specify the function parameters, matrix entries, or confusion matrix counts.
- Apply the closed-form or iterative formula: P(x) = y₀·(x−x₁)(x−x₂)/((x₀−x₁)(x₀−x₂)) + y₁·(x−x₀)(x−x₂)/((x₁−x₀)(x₁−x₂)) + y₂·(x−x₀)(x−x₁)/((x₂−x₀)(x₂−x₁)).
- Examine the primary result, error bounds, and 3 interactive SVG plots.
Result: Computes Lagrange Interpolation via P(x) = y₀·(x−x₁)(x−x₂)/((x₀−x₁)(x₀−x₂)) + y₁·(x−x₀)(x−x₂)/((x₁−x₀)(x₁−x₂)) + y₂·(x−x₀)(x−x₁)/((x₂−x₀)(x₂−x₁)).
Mathematics & Statistics · Numerical Analysis & Calculus
3-Point Lagrange Polynomial Interpolation & Divided Difference Calculator: inputs, method, and how to read the result
Interpolate y(x*) through 3 points using Lagrange basis polynomials L₀(x), L₁(x), L₂(x).
Choose inputs for the case you are checking
The defaults are illustrative. Replace them with values for your case and keep the units shown beside each field.
- Y At X0 Equals0: Ordinate y₀ at x₀ = 0.
- Y At X1 Equals1: Ordinate y₁ at x₁ = 1.
- Y At X2 Equals2: Ordinate y₂ at x₂ = 2.
- Query Target X: Target abscissa x* to interpolate.
What the calculation includes
With the default values shown, Interpolated Value P(1.5) is 6.5 y(x*). The calculation follows Lagrange Interpolation Formula; the formula and variable definitions above show how the inputs combine.
One-input check: With the other defaults held constant, changing Y At X0 Equals0 from 2 y(0) to 3 y(0) changes Interpolated Value P(1.5) from 6.5 y(x*) to 6.375 y(x*). This is a comparison inside the calculator's stated model, not a prediction.
Where to use caution
- Uses exact analytical or standard numerical analysis formulations from NIST DLMF.
- Double-precision floating-point arithmetic has ~15–17 significant decimal digits of precision.
Scope: Global Mathematical & Statistical Standard Check the assumptions and limitations against your situation before relying on the estimate.
More in Mathematics & Statistics: Scientific Calculator, Statistics & Standard Deviation Calculator, Permutations, Combinations, Probability, Sample Size & P-Value Calculator.