There are given the following linear subspaces: $$U=\{p\in \mathcal{P}_3\,|\,p(0)=0\},$$ $$W=\{p\in \mathcal{P}_3\,|\,p(1)=0\},$$ where $\mathcal P_{3}$ denotes a space of polynomials ($n\leq 3$).
First of all, consider $U$. Every polynomial $p$ from $U$ has to be of a form $$p(x)=ax^3+bx^2+cx.$$ Hence, it is easy to discover that the basis of $U$ would be $B(U)=\{x,x^2,x^3\}$. Naturally, dim(U)=3. Now, consider $W$. Take any $p\in \mathcal{P_3}$. Then $$p(x)=ax^3+bx^2+cx^2+d.$$ Note that $p(1)=0$ if and only if $a+b+c+d=1$, whence $d=-a-b-c$. So, every polynomial from $W$ is of a form $$p(x)=ax^3+bx^2+cx-a-b-c.$$ I thought that $B(W)=\{1,x,x^2,x^3\}$, but $p(x)=1$, does not belong to $W$. What would be the basis of $W$ and $U\cap W$?
Note that for W
$$p(x)=ax^3+bx^2+cx-a-b-c=a(x^3-1)+b(x^2-1)+c(x-1)$$
For the intersection $U\cap W$ $$p(x)=ax^3+bx^2-(a+b)x \implies p(x)=a(x^3-x)+b(x^2-x)$$