Basis of polynomial vector space with conditions

linear algebrapolynomialsvector-spaces

I understand that the monomial basis proposed in this answer: $\{1,x,x^2,x^3,\ldots,x^n\}$ spans a regular polynomial vector space, but what process would I use to create a basis when there is additional criteria regarding the polynomials? I.e. how would I construct the basis of a vector space of polynomials of degree 3 or less where $p(1) = p(-2)$?

Best Answer

If $p(x) = a_0+a_1x+a_2x^2+a_3x^3$ is a such polynomial, then $$\begin{align} a_0+a_1+a_2+a_3 &= p(1) \\ &= p(-2) = a_0-2a_1+4a_2-8a_3, \end{align}$$ which is equivalent to $3a_1-3a_2+9a_3=0$, or $a_2=a_1+3a_3$. Hence $$\begin{align} p(x) &= a_0+a_1x+(a_1+3a_3)x^2+a_3x^3 \\ &= a_0 \color{red}1 + a_1\color{red}{(x+x^2)} + a_3 \color{red}{(3x^2+x^3)}. \end{align}$$ Thus, we see that every polynomial $p(x)$ with $p(1)=p(-2)$ is a linear combination of the polynomials $1$, $x+x^2$ and $3x^2+x^3$. One can easily verify that these two indeed form a basis for that vector space (i.e. they are linearly independent).

Related Question