# Lagrange Interpolation

Lagrange interpolator is a polynomial of order $ N - 1 $, where $ N $ is the number of discrete points to interpolate in one dimension.

It is a linear combination of Lagrange polynomials:

\begin{equation} L_i(x_j) = \delta_{ij}; \end{equation} where:

\begin{equation} \delta_{ij} = \left\{ \begin{array}{l l} 0 & \quad i \neq j \\ 1 & \quad i = j \end{array} \right. \end{equation} The terms are obtained by the following formula:

\begin{equation} L_i(x) = \prod_{\substack{ i=1 \\ i \neq j }}^N \frac{x - x_j}{x_i - x_j}; \end{equation} and combined linearly such that:

\begin{equation} I_{Lagr.}(x) = I_{Lagr.}\left(f(x)\right) = \sum_{i=1}^N f(x_i)L_i(x). \end{equation} The relevant Matlab code can be found at the end of 1-D discrete data analysis section.

## No comments:

## Post a Comment