Skip to content
LaTeX (KaTeX) templates

Math — Lagrange Interpolation

Fitting a polynomial through given points.

Template previewLaTeX (KaTeX)
P(x)=∑iyi ℓi(x)P(x) = \sum_i y_i\,\ell_i(x)ℓi(x)=∏j≠ix−xjxi−xj\ell_i(x) = \prod_{j\neq i}\frac{x - x_j}{x_i - x_j}n+1 points⇒degree ≤nn+1 \text{ points} \Rightarrow \text{degree } \leq nP(xi)=yiP(x_i) = y_i

What this template contains

Equations
4
Source
4 lines

Make it your own.

P(x) = \sum_i y_i\,\ell_i(x)

\ell_i(x) = \prod_{j\neq i}\frac{x - x_j}{x_i - x_j}

n+1 \text{ points} \Rightarrow \text{degree } \leq n

P(x_i) = y_i