Lagrange's polynomial

In the Lagrange representation the interpolating polynomial is given by $$ \begin{equation*} P_n = \sum_{k=0}^nl_ky_k, \end{equation*} $$ with the Lagrange factors $$ \begin{equation*} l_k(x) = \prod_{\begin{array}{c}i=0 \\ i\ne k\end{array}}^n\frac{x-x_i}{x_k-x_i}\hspace{0.2cm} k=0,\dots,n. \end{equation*} $$