Finding how to decompose a polynomial with respect to a polynomials' basis This is the question from my textbook:
Represent the vector with respect to the basis $$x^2+x^3,\; \mathbf{B} = \langle 1, 1+x, 1+x+x^2, 1+x+x^2+x^3 \rangle$$
The explanation from the solution is that it is "easily solved by eye to give $c_{4}=1, c_{3}=0, c_{2}=-1 \;and \;c_{1}=0$"
I don't understand how they solved it by looking at it. My attempt was to set up a linear combination:
$$c_{1}(1)+c_{2}(1+x)+c_{3}(1+x+x^2)+c_{4}(1+x+x^2+x^3)=x^2+x^3$$ Can someone clarify if this would be the correct first step if I were to solve it by systems of equations? I got stuck on not knowing what I would set the equations equal to.
 A: I think you just have been caught by tunnel vision and you are not being able to see why it can be solved by just looking at it.
However since you have doubts regarding how to solve in a general scenario , I will provide an explanation.
Your first step is correct.
$$c_{1}(1)+c_{2}(1+x)+c_{3}(1+x+x^2)+c_{4}(1+x+x^2+x^3)=x^2+x^3$$
Then you procede to isolate the coefficients in order of the degree of monomial, which is just a fancy way speaking about the following step.
$(c_{1}+c_{2}+c_{3}+c_{4})\cdot 1 + (c_{2}+c_{3}+c_{4})x+ (c_{3}+c_{4})x^{2}+c_{4}x^{4}=x^{2}+x^{3}$.
Two polynomials written in the form $\sum_{i=0}^{n}a_{i}x^{i}$ and $\sum_{i=0}^{m}b_{i}x^{i}$ are equal precisely when $n=m$ and $a_{i}=b_{i}\,,\forall i\in\{1,2,..,n\}$
So now you can compare the coefficients and conclude
$$
c_1+c_2+c_3+c_4=0, \,c_2+c_3+c_4=0, \,c_3+c_4=1, \,c_4=1\;\tag{2}
$$
And you solve this system of equations in $4$ variables .
Or you can solve using matrices by considering matrix equation
$$\begin{bmatrix} 1& 1 & 1&1 \\ 0 &1 &1 &1 \\ 0&0&1&1 \\ 0 & 0& 0& 1\end{bmatrix}\cdot \begin{bmatrix} c_{1} \\c_{2} \\ c_{3} \\ c_{4}\end{bmatrix} =\begin{bmatrix} 0 \\ 0 \\ 1 \\ 1 \end{bmatrix}$$
Which you can do by Gaussian Elimination or Row echelon form or whatever method you like.
So in general given a harder polynomial, to express in terms of a particular basis you can apply the above steps .
A: 
$x^2+x^3,\; \mathbf{B} = \langle \,\underbrace{1}_{p_1}\,, \,\underbrace{1+x}_{p_2}\,, \,\underbrace{1+x+x^2}_{p_3}\,, \,\underbrace{1+x+x^2+x^3}_{p4}\, \rangle$

This one is "easily solved by eye", as they say, since you can "see" that $\,x^2+x^3 = p_4 - p_2\,$.
Even if it weren't, though, it's still easy to convert any polynomial to this base, if you "see" that:
$$
1 = p_1\,,\; x = p_2 - p_1\,,\; x^2 = p_3-p_2\,,\; x^3 = p_4 - p_3
$$
Then:
$$
\begin{align}
a + b\,x + c\,x^2 + d\,x^3 &\;=\; a\,p_1 + b\,(p_2-p_1)+c\,(p_3-p_2)+d\,(p_4-p_3)
\\ &\;=\; a\, p_1 + (b-c)\,p_2 + (c-d)\,p_3 + d\,p_4
\end{align}
$$
A: 
I don't understand how they solved it by looking at it.

"By looking at it" literally just means "looking at it"...
First of all, you must have $c_4=1$ since you need the $x^3$ term. Then by subtraction, you see that
$$
x^2+x^3=(1+x+x^2+x^3)-(1+x)
$$
which immediately gives you the answer.

If you want to do it systematically, you already have the correct first step.
Two polynomials $f(x)$ and $g(x)$ are equal if and only if all of their coefficients are the same. You already have
$$c_{1}(1)+c_{2}(1+x)+c_{3}(1+x+x^2)+c_{4}(1+x+x^2+x^3)=x^2+x^3\;.\tag{1}$$
This is equivalent to
$$
c_1+c_2+c_3+c_4=0, c_2+c_3+c_4=0, c_3+c_4=1, c_4=1\;\tag{2}
$$
which is a system of linear equations in the unknowns $c_1,c_2,c_3,c_4$. It can be solved easily by starting from $c_4=1$ and working backward.
If you wish, you can also write (2) in terms of matrices.
