How to trace equation from values of f(x) using Interpolation formulae I have the following data, representing the values of a function at given points: 
$f(1)=0$
$f(2)=5$
$f(3)=12$
$f(4)=21$
$f(5)=32$
I want to know the exact quadratic equation which was used above to get values of $f(x)$. How can I get to know it?
I remember that, at school, we used Newton's interpolation and  backward/forward interpolation formula. But all I see on the internet regarding the above methods is that we can find $f(x)$ for any $x$ given the above table, eg. we can find $f(4.5)$ by using above table. However I need to trace the original quadratic formula: is there any way to do so?
(The answer should be $f(x)=x^2+2x-3$.)
 A: We can use Lagrange Interpolation as mentioned in the comments by @lulu.
First, we find the Lagrange Polynomials for the five points:
$$L_0(x) = \dfrac {(x - x_1) (x - x_2) (x-x _3) (x - x_4)} {(x_0 - 
     x_1 ) (x_0 - x_2)(x_0 - x_3) (x_ 0 -x_4)} \\
L_1(x) = \dfrac {(x - x_0) (x - x_2) (x-x _3) (x - x_4)} {(x_1 -x_0 ) (x_1 - x_2)(x_1 - x_3) (x_1 -x_4)} \\
L_2(x) = \dfrac {(x - x_0) (x - x_1) (x-x _3) (x - x_4)} {(x_2 - 
     x_0) (x_2 - x_1)(x_2 - x_3) (x_2 -x_4)}\\
L_3(x) = \dfrac {(x - x_0) (x - x_1) (x-x _2) (x - x_4)} {(x_3 - 
     x_0 ) (x_3 - x_1)(x_3 - x_2) (x_3 -x_4)} \\
L_4(x) = \dfrac {(x - x_0) (x - x_1) (x-x _2) (x - x_3)} {(x_4 - 
     x_0 ) (x_4- x_1)(x_4 - x_2) (x_4 -x_3)}$$
The final result is given by
$$f(x) = f(x_0) L_0(x) + f(x_1) L_1(x) + f(x_2) L_2(x) + f(x_3) L_3(x) + f(x_4) L_4(x)
 = x^2+2 x-3$$
We can verify that $f(x)$ produces
$$f(1)=0, f(2)=5, f(3)=12, f(4)=21, f(5)=32$$
A: For a potentially less computationally intense method (also included in lulu's comment), you can solve a system of three equations.
You know that the general form of a quadratic equation is $$f(x)=ax^2+bx+c,$$ and since there are three unknowns ($a$, $b$, and $c$), you can plug in values from three points for $f(x)$ and $x$ and solve the resulting system of equations, drawing on the idea that any three points in the plane uniquely determine a parabola. For example, using the first three points you list, you would obtain the following system:
$$\begin{align}
0&=a+b+c \\
5&=4a+2b+c \\
12&=9a+3b+c
\end{align}$$
This does indeed give the desired result of $a=1$, $b=2$, $c=-3$.
