Let $q(x)=1+x+x^2+...+x^n$. Prove that if $p_1(x),..,p_n(x)$ is any basis for $W$, then $p_1(x),...,p_n(x),q(x)$ is a basis for $P_n(\mathbb{R})$ Let $W$ be a subspace of $P_n(\mathbb{R})$ be defined by $W = \{p(x) \in P_n (\mathbb{R}) |p(1)=0 \}$. Let $q(x)=1+x+x^2+...+x^n$. Prove that if $p_1(x),..,p_n(x)$ is any basis for $W$, then $p_1(x),...,p_n(x),q(x)$ is a basis for $P_n(\mathbb{R})$
My Attempt
First, construct a basis for $W$: $\{(x-1),(x^2-1),...,(x^n-1)\}$. Since both are basis, for $a_1...,a_n$ there is a  $b_1,...,b_n$ in $\mathbb{R}$:
$$a_1(x-1) + ... + a_n(x^n-1)=b_1p_1(x)+...+b_np_n(x)$$
Now I need to show that $p_1(x),...,p_n(x),q(x)$ is both spanning and linearly independent. Let $k \in \mathbb{R}$:
$$b_1p_1(x) + ... + b_np_n(x) + kq(x) = a_1(x-1)+ ... + a_n(x^n-1) + k(1+x+...+x^n) \\ 
= -a_1 -....-a_n + k + x(a_1+k) + ... + x^n(a_n + k)$$
Hence it must be spanning. Also, the only solution to $= \vec{0}$ is $a_1= ... =a_n=k=0$. Hence is a basis.
Is this a valid proof?
$$$$
 A: Expanding on what I wrote in the comments, sometimes you don't need to show both span and linear independence. In this case, we dont need to show span.
You already noted that $W$ is $n$-dimensional since you produced the basis $(x-1),\ldots,(x^n-1)$. Now given a basis $p_1(x),\ldots,p_n(x)$ for $W$, if we add one more linearly independent vector, we will get a basis for an $n+1$-dimensional subspace of $P_n$. But $P_n$ is $n+1$-dimensional, so we will obtain all of $P_n$. Thus if we can show $q(x)$ is linearly independent from $p_1(x),\ldots,p_n(x)$, we will be done. How do we do this? Well suppose $q(x)$ is a linear combination of the $p_1(x),\ldots,p_n(x)$. This will imply that $q(1)=0$. But obviously $q(1)>0$, a contradiction. Hence the collection $p_1(x),\ldots,p_n(x),q(x)$ is linearly independent, as desired.
A: It is correct but you don't have to find a basis for $W$ first.
Linear dependence: assume $$0 = \alpha_1p_1(x) + \cdots + \alpha_np_n(x) + \beta q(x)$$
and plug in $x = 1$. We get $0 = \beta q(1) = (n+1)\beta$ so $\beta = 0$. Therefore
$$0 = \alpha_1p_1(x) + \cdots + \alpha_np_n(x)$$
so since $\{p_1, \ldots, p_n\}$ is a basis for $W$ it follows $\alpha_j = 0$ for $1 \le j \le n$.
Span: let $p \in P_n(\Bbb{R})$. Then notice that $p(x) - \frac{p(1)}{n+1}q(x) \in W$ so there exist scalars $\alpha_1, \ldots, \alpha_n \in \Bbb{R}$ such that
$$p(x) - \frac{p(1)}{n+1}q(x) = \alpha_1p_1(x) + \cdots + \alpha_np_n(x)$$
so rearranging gives
$$p(x) = \alpha_1p_1(x) + \cdots + \alpha_np_n(x) + \frac{p(1)}{n+1}q(x).$$
