# Find conditions for a polynomial $p$ to be in a vector space $U$

Let $U = \operatorname{span}\{1+x, x + x^2, x^2-1\}$ and $p(x) = 2x^2 - 3x + m$.

Find all $m$ such that $p(x)$ lies in $U$.

This is a problem is my textbook. I don't understand very well how to do that.

Thanks :)

-

note that $x^2+x-(x^2-1)=x+1$, so $U=\operatorname{span}\{x+1, x^2-1\}$, then first write $2x^2-3x=2(x^2-1)-3(x+1)+5$, and note that $U$ can not contain any complex numbers, so the only choice for $m$ is $m=-5$.