Finding a basis for a subspace with function requirements I'm looking for help finding bases for two separate subspaces:
Question A: find a basis for P: $p$ element of Pol3, domain [0,2], Real, with requirement: $p(0)=p(1)=p(2)$
Question B: Find a basis for Q: $p$ element of Pol2, domain [0,2], Complex, with requirement: $xp'(x)=p(x)$
What I've tried
Question A
I've tried finding the first one by giving the inputs: $0$, $1$ and $2$ into the standard-basis of polynomials,
with the outcome vectors relative to the standard basis $(1, x, x^2, x^3)$:
$p(0) = (1, 0, 0, 0)$
$p(1) = (1, 1, 1, 1)$
$p(2) = (1, 2, 4, 8)$
Solving this did give me one eigenvector; $(0, 2, -3, 1)$, giving me one basis function: $2x - 3x^2 + x^3$, but I can't seem to find the second basis function for this question (which should be the function: $1$)
Question B
I actually don't know how I should approach this question.
 A: Any polynomial in $P_3$ has the general form $ax^3+bx^2+cx+d$.
$p(0)=p(1)=p(2)\\\Leftrightarrow d=a+b+c+d=8a+4b+2c+d\\\Leftrightarrow0=a+b+c=8a+4b+2c$
You get $(d,c,b,a)=(d,2a,-3a,a)=a(0,2,-3,1)+d(1,0,0,0)$ giving the basis vectors as $1,2x-3x^2+x^3$.

For the next part, any polynomial in $P_2$ has the form $ax^2+bx+c$.
$xp'(x)=p(x)\\\Leftrightarrow x(2ax+b)=ax^2+bx+c\\\Leftrightarrow a=2a\text{ and }c=0\\\Leftrightarrow a,c=0$
You get $(c,b,a)=(0,b,0)=b(0,1,0)$ giving the basis vectors as $x$.
A: For question A, notice that any $p$ in $P_2$ must have degree 0 or 3. This is seen by noticing that for such a polynomial $p$, we have that the polynomial $p - p(0)$ has 3 roots. Notice also that all constant polynomials are in $P_2$. So to generate the set, you need at least the span of your found polynomial and a constant polynomial, which we might aswell set to the polynomial 1. These two polynomials are clearly linearly independent. Because of the degree argument I outlined earlier, these span all of $P_2$.
For question 2, notice that any polymoial in $P$ will have no constant or degree 2 term. On the other hand, if a polynomial $p$ has no constant or degree 2 term, it will satisfy the equation $xp^{\prime}(x)=p(x)$, so we get that $P$ is the set of polynomials of degree 1 with no constant term. It should not be hard to see that $x$ is a basis of this space.
