Prove any polynomial of degree n that is orthogonal to ${1, x, ..., x^{n-1}}$ is a constant multiple of a Legendre Polynomial. The Legendre Polynomials are defined by $L_n(x) = \frac{d^n}{dx^{n}} (x^2 - 1)^n$. The inner product in this case is defined on $[-1, 1]$ as follows:
$\langle f(x), g(x)\rangle = \int_{-1}^{1} f(x)g(x)dx$. 
I'll denote the arbitrary polynomial of degree n by $P_n(x)$. Since it is orthogonal to $\{1, x, ..., x^{n-1}\}$, then it is orthogonal to $g_{n-1}(x) = a_0 + a_1 x + ... + a_{n-1}x^{n-1}$. 
Therefore $\langle P_n(x), g_{n-1}(x)\rangle = \int_{-1}^{1} P_n(x)g_{n-1}(x)dx = 0. $
If I expand $g_{n-1}(x)$, I have $n$ finite integrals, whose sum is 0. But how do I show that this implies $P_n(x) = k L_n(x)$ for some constant $k$? Am I taking the right approach?
 A: The Legendre polynomials $L_0(x), \ldots, L_n(x)$.  form a basis for the vector space of polynomials of degree $\leq n$.  Hence any polynomial $p(x)$ of degree $n$ can be written uniquely as a sum $p(x) = \sum_{k=0}^n a_k L_k(x)$.  By your argument, $p(x)$ is orthogonal to each $L_i(x)$ for $i < n$, so $$0 = \int_0^1 L_i(x) p(x) \, dx =  \int_0^1  L_i(x) \sum_{k=0}^na_kL_k(x)\, dx = a_i \int_0^1 L_i(x) L_i(x) \, dx$$ which gives $a_i = 0$.  So $p(x) = a_n L_n(x)$.
Edit: To see that the Legendre polynomials form a basis of the vector space of polynomials, note that $L_n(x)$ has degree $n$.  In fact any sequence of polynomials $p_n(x)$ so that $p_n(x)$ has degree $n$ will form a basis.  The reason is that the transition matrix from the standard basis $x^n$ to the $p_n(x)$ is lower triangular:
$$
\left(\begin{matrix}
p_0(x)\\
p_1(x)  \\
\vdots \\
p_n(x)  
\end{matrix}\right)=
\left(\begin{matrix}
a_{11} &  0  & \ldots & 0\\
a_{21}  &  a_{22} & \ldots & 0\\
\vdots & \vdots & \ddots & \vdots\\
a_{n1}  &   a_{n2}       &\ldots & a_{nn}
\end{matrix}\right)\left(\begin{matrix}
1\\
x  \\
\vdots \\
x^n  
\end{matrix}\right)
$$
The diagonal entries are nonzero by definition since $p_k(x)$ has degree $k$, so the matrix has determinant $a_{11} a_{22} \cdots a_{nn} \neq 0$ and is nonsingular.
A: A simple answer.
Suppose there exsit a n-degree polynomial $P_n(x)=\sum_{i=0}^na_ix^{n-i}$
satisfy
$P_n(x)-cL_n(x)≠0$ for any c in R, which $L_n(x)$ is n-degree Legendre polynomial. We note $a_0^{L_n}≠0$ as the coefficient of $x^n$ in $L_n(x)$.
and $\int_{-1}^{1}P_n(x)x^mdx=0$, where $m=0,1,2,...,n-1$.
For $a_0≠0$, there must be a non-zero real number $c=a_0/a_0^{L_n}$, thus $Q(x)=P_n(x)-cL_n(x)≠0$ is a n-1 degree polynomial also satisfy
$\int_{-1}^{1}Q(x)x^mdx=0$, where $m=0,1,2,...,n-1$.
Because Q(x) can be expressed in $1,x,x^2,...,x^{n-1}$, So
$\int_{-1}^{1}Q^2(x)dx=0$.
But Q(x) is a continuous function！Q(x) must be zero everywhere in [-1,1], leading to contradiction!
So $P_n(x)-cL_n(x)=0$ for some c.
Q.E.D
