Fix a $\in$ $\mathbb{R}$. Consider the vectors $a + x + x^2$, $1 + x^2$ and $x$ in the $\mathbb{R}$-vector space $P(\mathbb{R})$ of polynomial functions over $\mathbb{R}$. Then $x^2$ belongs to the linear span of $a + x + x^2$, $1 + x^2$, $x$ iff $a \neq 0$.
This was on a multi-choice practice test and it was a supposedly correct lucky guess. I understand what a linear span is (the collection of all linear combinations), but is there a more concrete way of actually determining if a vector is in a span? Our notes in class are pretty vague.
You want to see if there exists real numbers $p,q,r$ such that $$x^2=p(a+x+x^2)+q(1+x^2)+r(x).$$ Comparing coefficients of powers of $x$ on both sides we get \begin{align*} p+q&=1\\ p+r&=0\\ ap+q&=0. \end{align*} Now see if you can find value(s) of $a$ for which the system is consistent.