Finding a basis for $W=\{p(x)\in \mathbb{P}_3 \mid p(-1)=p(2)=0\}.$ 
Find a basis for $W=\{p(x)\in \mathbb{P}_3 \mid p(-1)=p(2)=0\}.$

First off, $\mathbb{P}_n$ denotes the vector space with polynomials with degree $n$ or lower.
My work/thinking:
I know that for $\mathbb{P}_n$, its standard basis would be $\{1,x,x^2, \cdots,x^n\}.$
Would this be a correct basis for $W$?
$W_{\text{Basis}}=\{1,(x+1)(x-2),(x+1)^2(x-2),(x+1)^3(x-2)\}$
Since the problem wants the basis for polynomials in $\mathbb{P}_3$, with the roots being $x=1$ and $x=2$, I just thought of one way for the polynomial to have the given roots, and then I just raised its degree from $1$ to $3$. I did that because from what I understand about polynomials in sets, they are linearly independent if each of the elements in the set have different degrees. (Please correct me if I am wrong about this.)
 A: Hint 1:
You have too many elements in your bases.  First of all, $p(x)=1$ satisfies neither of $W$'s defining properties, and $(x+1)^3(x-2)$ has degree greater than $3$.
However, $\{(x+1)(x-2),(x+1)^2(x-2)\}$ are indeed linearly independent and both within the set.  Now, is this a complete basis?  Why or why not?
Hint 2
We can write polynomials $a+bx+cx^2+dx^3$ as vectors of the form $\begin{bmatrix}a&b&c&d\end{bmatrix}^T$.  In that case, this subspace is the following solution-space for $\vec x$: 
$$
\begin{bmatrix}
1 & -1 & 1 & -1\\
1 & 2 & 4 & 8
\end{bmatrix} \vec x=\vec 0
$$
A: Let $P \in  W$
$P(-1)=0$ so $X+1\mid P$
$P(2)=0$ so $X-2\mid P$
Since $X+1 \land X-2 = 1$, $(X+1)(X-2)\mid P$
So we can find $Q$ so that $P=(X+1)(X-2)Q$
Since $P$ is of degree at most $3$, $Q$ is of degree at most $1$ so there is an $\alpha,\beta  \in \Bbb R$ so that $Q=\alpha X + \beta$
Let $S=\{(X+1)(X-2)(\alpha X + \beta) \mid \alpha,\beta \in \Bbb R\}$
We have just shown that $S\subseteq W$
Now let $P\in S$. From its expression, it's obvious that $P(-1)=0=P(2)$ so $S\subseteq W$
So we have that $S=W$
Can you find a basis for $S$?

By that way, in case you have already studied linear systems, it is easy to see $W$ is of dimension $2$.
You want the elements of $\Bbb P_3$, polynomials $aX^3+bx^2+cX+d$, that satisfy two equations: $-a+b-c+d=0$ and $8a+4b+2c+d=0$. Since both equations are linearly independent, you get a subspace of dimension $\dim \Bbb P_3 - $"number of linearly independant equations "$=4-2=2$.
A: Just as another way of solving this problem. You can use the method of undetermined coefficients: you apply your conditions for a general polynom $a_{n} x^n + a_{n-1} x^{n-1} + \dots + a_0$ of degree less or equal then $n$. Applying restrictions gives you a system of linear equations. Choosing the basis for a solution of this system is equivalent to choosing basis in space of polynoms with such properties.
