Prove that the integral of P_n(x)P_m(x) on [-1,1] is 0 From Introduction to Calculus and Analysis I by Richard Courant and Fritz John. Problem: Let $$P_n(x)=\frac{1}{2^n n!}\frac{d^n}{dx^n}((x^2-1)^n)$$
Show that $$\int_{-1}^{1}P_n(x)P_m(x)=0 \;\;\text{if $m\ne n$} $$
My work:
First, I evaluated (or tried to evaluate) $$\frac{d^n}{dx^n}((x^2-1)^n)$$
I applied binomial theorem to the function to be differentiated and got:
$$\sum_{i=0}^{n}\binom{n}{i}(-1)^{n-i} x^{2i}$$
Differentiating a few times gives me
$$\frac{d}{dx}((x^2-1)^n)=\sum_{i=1}^{n}\binom{n}{i}(2i)(-1)^{n-i} x^{2i-1}$$
$$\frac{d^2}{dx^2}((x^2-1)^n)=\sum_{i=1}^{n}\binom{n}{i}(2i)(2i-1)(-1)^{n-i} x^{2i-2}$$
Hence I find the following expressions: for n an even number and m an odd number,
$$\frac{d^n}{dx^n}((x^2-1)^n)=\sum_{i=n/2}^{n}\binom{n}{i}(2i)(2i-1) ...(2i-n+1)(-1)^{n-i} x^{2i-n}$$
$$\frac{d^m}{dx^m}((x^2-1)^m)=\sum_{i=(m+1)/2}^{m}\binom{n}{i}(2i)(2i-1) ...(2i-m+1)(-1)^{m-i} x^{2i-m}$$
I noticed that $P_n(x)$ is an even function, while $P_m(x)$ is an odd function. Hence $\int_{-1}^{1}P_n(x)P_m(x)=0.$ But if n and m are both even or both odd, then $P_n(x)P_m(x)$ will be an even function, so $\int_{-1}^{1}P_n(x)P_m(x)\ne 0$. How may I proceed in this case?
EDIT: I don't want to use advanced linear algebra concepts or formulas to solve this, nor do I expect the use of Taylor series. And certainly no differential equations, please.
 A: You can show this without doing much explicit calculations at all. You just need to do a bit of integration by parts and know some basic facts about polynomials.
Writing out what the integral means we get the complicated expression
$$\frac{1}{2^nn!2^mm!}\int_{-1}^1\left[\frac{d^n}{dx^n}(x^2-1)^n\right]\cdot\left[\frac{d^m}{dx^m}(x^2-1)^m\right]{\rm d}x$$
First notice that $(x^2-1)^n = (x-1)^n(x+1)^n$ is a polynomial of degree $2n$ that has a zero of degree $n$ at both $x=1$ and $x=-1$. This means that all the first $n-1$th derivatives of this function will also have a zero at $x=\pm 1$. This fact will be important for us when we do integration by parts below as it will ensure that the boundary term will vanish.
Now recall integration by parts: $\int_{-1}^1 uv'dx = [uv]_{-1}^1 - \int_{-1}^1 vu'dx$. Note that if the boundary term $uv$ is zero at $x=\pm 1$ then we simply have $\int_{-1}^1 uv'dx = -\int_{-1}^1 vu'dx$. This is very useful as it allows us to easily "transfer" derivatives from one term to the other (it just gives rise to a change of sign).
We can now perform the argument. Assuming that $m>n$ we transfer $n$ of the $m$-derivatives over to the other term using integration by part $n$ times in a row. From the discussion above this simply gives
$$(-1)^n\frac{1}{2^nn!2^mm!}\int_{-1}^1\left[\frac{d^{n+n}}{dx^{n+n}}(x^2-1)^n\right]\cdot\left[\frac{d^{m-n}}{dx^{m-n}}(x^2-1)^m\right]{\rm d}x$$
The factor of $(-1)^n$ comes from the $n$ sign changes we get from the integration by part. Now since $(x^2-1)^n$ is a polynomial of degree $2n$ then the $n+n=2n$ derivative of this expression will just be a constant! So we are left with the integral of the $m-n$ derivative of $(x^2-1)^m$. This integral is just the $m-n-1$ derivative of $(x^2-1)^m$ evaluated at $x=\pm 1$ which we know is zero.
Now what happens for $n=m$? After transfering over $n$ derivatives there are no more left (the last term is simply $(x^2-1)^m$) so the final integral is no longer the integral of a derivative and the argument fails (which is good as the result is in fact non-zero).
A: These are called Legendre polynomials.
You're looking for a proof that any two distinct Legendre polynomials are orthogonal. This is quite a standard proof, you can see one in these notes I wrote here:

A: This type of polynomials has the name "Associated Legendre Polynomials". The proof of the orthogonality can be found, for example, here
Associated Legendre Polynomials Orthogonality Proof: $\int_{-1}^1 P_k^m(x) \cdot P_l^m(x) \; \mathrm{d} x = \frac{2(l+m)!}{(2l+1)(l-m)!} \delta_{k,l}$
