# [Math] how to prove a spanning set of polynomial

linear algebravector-spaces

I am struggling so much understanding this concept of subspace and span.

The question is, Given that

$$P2:W=\{(x+1)(ax+b)| a,b \in R\}$$
show that
$$\{x^2+x, x^2+2x+1\}$$
is a spanning set of $$W$$.

I don't know if I got this concept right, but I've tried to do things by letting
$$p(x)=x^2+x$$
$$q(x)=x^2+2x+1$$
then multiplying them a coefficient $$\alpha$$ and $$\beta$$ each and adding to fit in with $$W$$.

but then I got an answer saying $$a=\alpha + \beta$$, $$a+b = \alpha+ 2\beta, b=\beta$$, which means… no solution? I am guessing? so this does not span $$W$$. Am I right?

$$(x+1)(ax+b)=ax^2+(b+a)x+b.$$
Claim: There exists $$\alpha, \beta\in \Bbb R$$ such that $$ax^2+(b+a)x+b=\alpha(x^2+x)+\beta( x^2+2x+1)\tag1$$ $$ax^2+(b+a)x+b=(\alpha+\beta)x^2+(\alpha+2\beta)x+\beta$$ Comparing coefficients, we get $$a=\alpha+\beta\tag2$$ $$b+a=\alpha+2\beta\tag3$$ $$b=\beta \tag4$$ Substituting $$(4)$$ in $$(1)$$ gives $$\alpha=a-b$$ (you can verify the solution using $$(3)$$). In other words, $$\forall a,b\in\Bbb R$$, there exists $$\alpha=a-b, \beta =b$$ such that $$(1)$$ holds. Hence $$\{x^2+x,x^2+2x+1\}$$ is indeed a spanning set.