24. Lagrange interpolation#
Let \(p_n(t)\) a polynomial interpolation of the points \(\left\{(t_k, y_k) \right\}_{k=0:n}\), with \(y_k = y(t_k)\). Lagrange interpolation of \(n+1\) points requires a polynomial of degree \(n\).
24.1. Lagrangian basis, and polynomial interpolation#
Lagrangian basis. The Lagrangian basis is a set of \(n+1\) functions \(\ell_k(t)\), so that
In order to satisfy these n+1 conditions, the \(k^{th}\) function of the Lagrange basis reads
Properties.
\(\ell_k(t_j) = \delta_{jk}\)
\(\sum_k \ell_k(t) = 1\) todo Prove it!
Polynomial approximation. The Lagrange interpolating polynomial immediately follows as the linear combination
24.2. Low-degree approximations with constant steps#
Constant-step sampling means \(t_k = t_0 + k h\), being \(h\) the step.
One-node approximation, \((t_0, y_0)\)
\[\ell_0(t) = 1\]so that the constant approximation reads \(L_0(t) = y_0 \ell_0(t) = y_0\).
Two-node approximation, \((t_0, y_0)\), \((t_1, y_1)\)
\[\begin{split}\begin{aligned} \ell_0(t) & = \frac{t-t_1}{t_0 - t_1} = - \frac{t-t_1}{h} \\ \ell_1(t) & = \frac{t-t_0}{t_1 - t_0} = \frac{t-t_0}{h} \\ \end{aligned}\end{split}\]so that the 1-degree approximation reads \(L_1(t) = y_0 \ell_0(t) + y_1 \ell_1(t)\).
Three-node approximation, \((t_0, y_0)\), \((t_1, y_1)\), \((t_2, y_2)\)
\[\begin{split}\begin{aligned} \ell_0(t) & = \frac{(t-t_1)(t-t_2)}{(t_0 - t_1)(t_0 - t_2)} = \frac{(t-t_1)(t-t_2)}{2 h^2} \\ \ell_1(t) & = \frac{(t-t_0)(t-t_2)}{(t_1 - t_0)(t_1 - t_2)} = - \frac{(t-t_0)(t-t_2)}{ h^2} \\ \ell_2(t) & = \frac{(t-t_0)(t-t_1)}{(t_2 - t_0)(t_2 - t_0)} = \frac{(t-t_0)(t-t_1)}{2 h^2} \\ \end{aligned}\end{split}\]so that the 2-degree approximation reads \(L_2(t) = y_0 \ell_0(t) + y_1 \ell_1(t) + y_2 \ell_2(t)\).
Four-node approximation, \((t_0, y_0)\), \((t_1, y_1)\), \((t_2, y_2)\), \((t_3, y_3)\)
\[\begin{split}\begin{aligned} \ell_0(t) & = - \frac{(t-t_1)(t-t_2)(t-t_3)}{6 h^3} \\ \ell_1(t) & = \frac{(t-t_0)(t-t_2)(t-t_3)}{2 h^3} \\ \ell_2(t) & = - \frac{(t-t_0)(t-t_1)(t-t_3)}{2 h^3} \\ \ell_3(t) & = \frac{(t-t_0)(t-t_1)(t-t_2)}{6 h^3} \\ \end{aligned}\end{split}\]so that the 3-degree approximation reads \(L_3(t) = \sum_{k=0}^{3} y_k \ell_k(t)\).
24.3. Applications#
24.3.1. Lagrange interpolation and multi-step methods for IVPs governed by ODEs#
24.3.1.1. Adams-Bashforth#
AB1. Using \(n=0\) approximation with points \((t_0, f_0)\) to integrate from \(t_0\) to \(t_1\)
and thus, AB1 is the explicit Euler method
AB2. Using \(n=1\) approximation with points \((t_0, f_0)\), \((t_1, f_1)\) to integrate from \(t_1\) to \(t_2\)
and thus
24.3.1.2. Adams-Moulton#
AM1. Using \(n=0\) approximation with points \((t_1, f_1)\) to integrate from \(t_0\) to \(t_1\)
and thus, AB1 is the implicit Euler method
AM2. Using \(n=1\) approximation with points \((t_1, f_1)\), \((t_2, f_2)\) to integrate from \(t_1\) to \(t_2\)
and thus
24.3.1.3. Backward Differentiation Formulas#
BDF1 Using \(n=1\) approximation
and thus, BDF1 is the implicit Euler method,
BDF2 Using \(n=2\) approximation
and thus
i.e.