Find the basis for the subspace of the set of polynomials of degree less than five? Let U = {p $\in P_4(F): p(2) = p(5) = p(6)$. Find a basis for U.
I know how to do this problem if I were given p(2) = p(5). Set the two equal to each other and solve for one of the coefficients. I just have no idea how to do this when given three conditions like this. Help? Much Appreciated.
 A: What you have here is just a system of equations in disguise. Let the polynomials in question be
$$p(x)=a_4x^4+a_3x^3+a_2x^2+a_1x+a_0$$
Then your system is to solve:
$$\begin{cases}(2^4-5^4)a_4+(2^3-5^3)a_3+(2^2-5^2)a_2+(2-5)a_1=0 \\
(2^4-6^4)a_4+(2^3-6^3)a_3+(2^2-6^2)a_2+(2-6)a_1=0\end{cases}$$
i.e.

$$\begin{cases}
203a_1+39a_3+7a_2+a_1=0 \\
160a_1+26a_3+8a_2+a_1=0
\end{cases}$$

after reducing out common factors. Note here we are treating the coefficients as variables. Then you can find a basis by solving the system of equations using row reduction to get free variables and constraints.
A: First find dimension of $U$. It's $5-2=3$ (because $\dim P_4=5$ and you have two condition $p(2)=p(5)$ and $p(2)=p(6)$). 
Next you can should find three linear independent polynomial of degree less than pive which satisfy $p(2)=p(5)$ and $p(2)=p(6)$.
1)First is easy: $p(x)=1$ for all $x$.
2)Note that you can't find polynomial of degree $1$ or $2$ which satisfy the conditions (line or parabola can cut horizontal line only in two points). So first find $p(x)$ in form $x^3+a_1x^2+a_2x+a_3$ and $x^4+b_1x^3+b_2x^2+b_3x+b_4$. You can find $a_1,a_2,a_3,b_1,b_2,b_3,b_4$ using $p(2)=p(5)=p(6)$.
A: Hint: Suppose $p$ vanished at 2,5 and 6. What would be the basis in that case?
A: Note that a polynomial of degree at most $4$ is specified by its values at $5$ points. So we should be able to identify a basis for a polynomial subspace by an interpolation procedure. So let's throw in two more points, call them $x_1$ and $x_2$, and set $x_3=2,x_4=5,x_5=6$. Then Lagrange interpolation furnishes the basis elements:
$$p_k(x) = \frac{\prod_{j=1,j \neq k}^5 (x-x_j)}{\prod_{j=1,j \neq k}^5 (x_k-x_j)}.$$
Then the interpolant to $(x_1,y_1),\dots,(x_5,y_5)$ is given by $\sum_{k=1}^5 y_k p_k(x)$. This means your subspace is
$$\left \{ a p_1 + b p_2 + c p_3 + c p_4 + c p_5 : a,b,c \in \mathbb{R} \right \}$$
Can you find a basis from here?
An alternative would be to find a quadratic polynomial with $q(2)=q(5)=q(6)=1$ by any interpolation method. Then, noting that the dimension is $3$, you can throw in two more linearly independent polynomials which vanish at all three points in order to fill out the space. This makes
$$\{ q,(x-2)(x-5)(x-6),x(x-2)(x-5)(x-6) \}$$
another basis for the subspace.
