Finding a specific polynomial function, with conditions. 
Find a polynomial such that $f(x) = a + bx + cx^2 +dx^3 + ex^4$ such
that $f(1)=1, f(2) = -1, f(-1)=5, f(3) = -59, f(-2) = -29$

Any hints on how to approach this? I was thinking about plugging in the f value and then the result in order to build a matrix like this, but I am not sure if that is what I am supposed to do here.
$\displaystyle \begin{pmatrix}
a & b & c & d & e & 1\\
a & -b & -c & -d & -e & -1\\
a & -b & -c & -d & -e & 5\\
a & 3b & 3c & 3d & 3e & -59\\
a & -2b & -2c & -2d & -2e & -29
\end{pmatrix}$
does this make any sense?
 A: $f(1)=1, f(2)=-1,f(-1)=5,f(3)=-59,f(-2)=-29$
Provided a linear $5\times 5$ sysytem of equation as $MV=U$
where $$M=\begin{pmatrix} 1 & 1 &1 &1 &1 \\ 1 & 2 & 4 & 8 & 16 \\ 1 & -1 & 1 &-1 & 1\\ 1 & 3 & 9 & 27 & 81 \\ 1 & -2 & 4 & -8 & 16 \end{pmatrix}, V=\begin{pmatrix} a \\ b\\ c\\ d\\ e \end{pmatrix}, U =\begin{pmatrix} 1 \\ 2 \\ -1 \\ 5 \\ -59 \\ -29 \end{pmatrix}.$$ Solving this equation by LinearSolve of Mathematica we get get $$V=\begin{pmatrix} 1 \\ -5 \\ 4 \\ 3 \\ -2 \end{pmatrix}$$
Finally, we get $f(x)=1-5x+4x^2+3x^3-2x^4.$
Mathe matica Command: LinearSolve[m,u]
A: You need to calculate f(1), f(2), f(-1), f(3) and f(-2) to find the coefficients.
f(1) = a+b+c+d+e = 1
f(2) = a+2b+4c+8d+16e = -1
f(-1) = a-b+c-d+e = 5
f(3) = a+3b+9c+27d+81e= -59
f(-2)= a-2b+4c-8d+16e = -29
Next we take the coefficients and the result and we put them in a matrix:
A=
| 1  1  1  1  1   |
| 1  2  4  8  16  |
| 1 -1  1 -1  1   |
| 1  3  9 27  81  |
| 1 -2  4 -8  16  |
C will be the matrix with the outputs:
| 1|
|-1|
| 5|
|-59|
|-29|
B will be the matrix with the letters:
|a|
|b|
|c|
|d|
|e|
Now we need to solve the matrix equation A*B=C.
But because in matrix algebra there is no division operation, we need to multiply both sides with the inverse of the matrix A. We will call the inverse A'. So the equation becomes:
(A')(A)(B) = (A')*(C)
Since A' is the inverse of A, (A')*(A)= I and I is the identity matrix(a matrix that when its multiplied by another one doesnt change the result) So the equation is:
(B)=(A')*(C)
So now we need to calculate the inverse, and multiply it by the matrix C, and those thats all. To do that there are multiple ways and honestly its been too long since high school. But i leave you with this link: https://www.mathsisfun.com/algebra/systems-linear-equations-matrices.html
