Using Orthogonality of Legendre Polynomials to determine a Recurrence Relation This is something that I've been struggling on for a few hours now and would appreciate any help:
Rodrigue's formula:
$P_n(x)$ = $ \frac{1}{2^nn!} \frac{d^n}{dx^n}(x^2-1)^n $
The Legendre polynomials (given by the above formula) $ \{P_0,...,P_n\} $ form an orthogonal basis of the space of all polynomials of degree at most $n$ (integer).
Let $P_n(x) = a_{n,n}x^n +a_{n-1,n}x^{n-1} + ...+ a_{0,n} $
We are given that:
1) The leading coefficient $a_{n,n} = \frac{(2n)!}{2^n(n!)^2}$
2) The polynomial $xP_n(x) $ of degree $n+1$ can be written as:  $xP_n(x) = \frac{n+1}{2n+1}P_{n+1}(x) + Q(x) $
Question: Show that $Q(x)$ is orthogonal to $P_j(x)$ for all $j\geq n-2$.
Conclude that there exists constants A and B such that
$Q(x) = AP_n(x) +BP_{n-1}(x) $
Using the normalisation condition relation $P_n(1)=1$ for all $n \geq 0$, and the fact that $\int_{-1}^{1} x|P_n(x)|^2dx=0$, show that $A=0$ and $B=\frac{n}{2n+1}$. Deduce from this recurrence relation:
$(n+1)P_{n+1}(x) = (2n+1)xP_n(x)-nP_{n-1}(x)$
My attempt:
For orthogonality: 
I have considered the inner product of $Q(x)$ and $P_j(x)$ w.r.t weight function $w(x)=1$. However I'm having some issues with the integration and not sure how to proceed with the rest of the question.
$\langle{Q(x)}, {P_j(x)} \rangle$ = $\int_{-1}^{1} Q(x)P_j(x) dx$
=$\int_{-1}^{1} (xP_n(x)-\frac{n+1}{2n+1}P_{n+1}(x))P_j(x) dx$
=$\int_{-1}^{1} xP_n(x)P_j(x) dx - \frac{n+1}{2n+1}\int_{-1}^{1}P_{n+1}(x)P_j(x) dx $
I know that this must equal zero, but how exactly? And also how can we conclude that constants $A$ and $B$ exist such that $Q(x)$ takes the second form?
 A: Long ago I answered a similar question detailing these things, see Legendre Equation Properties
.
A: I think $j$ should be equal or less then $n-2$. In fact the actual recurrence formula for legendre polynomials has $Q(x)=\frac{n}{2n+1}P_{n-1}(x)$, so obviously $Q$ can't be orthogonal to $P_{n-1}$. 
Since $\{P_0,...,P_n\}$ form a basis of the space of all polynomials of degree at most $n$, wich is orthogonal with respect of the scalar product in $L_2([-1,1])$, we have:
$$<P_{n+1},P_j>_{L_2([-1,1])}=\int_{-1}^1P_{n+1}(x)P_j(x)dx=0$$
for all $j\leq n-2$ for orthogonality. For the other integral consider the term $xP_j(x)$: since $j\leq n-2$ this is at most a polynomial of degree $n-1$ and since $\{P_0,...,P_{n-1}\}$ is a base of the space of all polynomials of degree at most $n-1$ we can rewrite $xP_j(x)=\sum_{i=0}^{n-1}\alpha_iP_i(x)$. Now we use the linearity of the integral and write:
$$\int_{-1}^1xP_n(x)P_j(x)dx=\int_{-1}^1P_n(x)\sum_{i=0}^{n-1}\alpha_iP_i(x)dx=\sum_{i=0}^{n-1}\alpha_i\int_{-1}^1P_n(x)P_i(x)dx=$$
$$=\sum_{i=0}^{n-1}\alpha_i<P_n,P_i>_{L_2([-1,1])}=\sum_{i=0}^{n-1}\alpha_i0=0$$
for orthogonality of $P_n$ on $P_0,...,P_{n-1}$. 
This means that $Q(x)$ can't be a polynomial of degree $n-2$ or less , furthermore we have that:
$$0=\int_{-1}^1x|P_n(x)|^2dx=\int_{-1}^1\frac{n+1}{2n+1}P_{n+1}(x)P_n(x)dx+\int_{-1}^1Q(x)P_n(x)dx=\int_{-1}^1Q(x)P_n(x)dx$$
wich means that $Q(x)$ is not of degree $n$. Obviously since $xP_n(x)=\frac{n+1}{2n+1}P_{n+1}(x)+Q(x)$, $Q(x)$ can't have degree higher then $n+1$, so its degree must be $n-1$ or $n+1$ for what we have shown so far. 
Now we use the fact that $a_{n,n}=\frac{(2n)!}{2^n(n!)^2}$: since
$$a_{n,n}=\frac{(2n)!}{2^n(n!)^2}=\frac{n+1}{2n+1}\frac{(2n+2)!}{2^{n+1}((n+1)!)^2}=\frac{n+1}{2n+1}a_{n+1,n+1}$$
$Q(x)$ can't have degree $n+1$ or else it would contribute in this equality with the coefficent of its term of power $n+1$, making it false. So $Q(x)$ has degree $n-1$ and must be, for orthogonality properties demonstrated before, $BP_{n-1}$. 
Now we conclude observing that $P_n(1)=1$ for all $n\geq 0$, so from the equality $xP_n(x)=\frac{n+1}{2n+1}P_{n+1}(x)+Q(x)$ we have
$$1=\frac{n+1}{2n+1}1+Q(1)=\frac{n+1}{2n+1}+B$$
so $B=\frac{n}{2n+1}$ and we have the recurrence formula.
