<s>[INST] Using the Lagrange interpolation formula to find a polynomial f with $f(-1)=-6, f(0)=2, ...$ The exercise goes as follows: 
Use the Lagrange interpolation formula to find a polynomial $f$ with real coefficients such that $f$ has degree $\leq3$ and $f(-1)=-6, f(0)=2, f(1)=-2, f(2)=6$.
So to start, I wrote down the formula $$f=\sum^n_{i=0}f(t_i)P_i$$
But I didn't manage to get much further than that. I understand that $P_i$ are polynomials of degree $i$, but I'm not sure how I can do anything with that information.
 [/INST] I would like to propose an alternative way to solve the problem. Coefficients of Lagrange interpolation polynomial can be found if one uses a determinant form of Lagrange interpolation presented in "Beginner's guide to mapping simplexes affinely", section "Lagrange interpolation" (you may check for concrete example in "Workbook on mapping simplexes affinely"). General formula looks as follows
$$
f(x) = (-1)
\frac{
    \det
    \begin{pmatrix}
        0       & f_0       & f_1       & \cdots & f_n       \\
        x^n     & x_0^n     & x_1^n     & \cdots & x_n^n     \\
        x^{n-1} & x_0^{n-1} & x_1^{n-1} & \cdots & x_n^{n-1} \\
        \cdots  & \cdots    & \cdots    & \cdots & \cdots    \\
        1       & 1         & 1         & \cdots & 1         \\
    \end{pmatrix}
}{
    \det
    \begin{pmatrix}
        x_0^n     & x_1^n     & \cdots & x_n^n     \\
        x_0^{n-1} & x_1^{n-1} & \cdots & x_n^{n-1} \\
        \cdots    & \cdots    & \cdots & \cdots    \\
        1         & 1         & \cdots & 1         \\
    \end{pmatrix}
}.
$$
EXAMPLE
Let's consider your case: $f(-1) = -6$, $f(0) = 2$, and $f(2) = 6$. Previous equation should be written as
$$
f(x) = (-1)
\frac{
    \det
    \begin{pmatrix}
        0       & -6       & 2       & 6       \\
        x^2     & (-1)^2   & 0^2     & 2^2     \\
        x       & -1       & 0       & 2       \\
        1       & 1        & 1       & 1       \\
    \end{pmatrix}
}{
    \det
    \begin{pmatrix}
        (-1)^2   & 0^2     & 2^2     \\
        -1       & 0       & 2       \\
        1        & 1       & 1       \\
    \end{pmatrix}
} = 2 + 6 x - 2 x^2.
$$
Now it is easy to check that
$$
\begin{aligned}
    f(-1) &= 2 - 6 - 2(-1)^2 = -6,\\
    f(0)  &= 2 + 0 - 0 = 2,\\
    f(2)  &= 2 + 12 - 2\, (2)^2 = 6
\end{aligned}
$$
</s>