Legendre polynomial to show identity, can't spot mistake Using Legendre polynomial generating function
\begin{equation}
\sum_{n=0}^\infty P_n (x) t^n  = \frac{1}{\sqrt{(1-2xt+t^2)}}
\end{equation}
Or $$ P_n(x)=\frac{1}{2^n n!} \frac{d^n}{dx^n} [(x^2-1)^n]  $$    
Show$$ P_{2n}(0)=\frac{(-1)^n (2n)!}{(4)^n (n!)^2}     $$ 
And $$ P_{2n+1}(0)=0$$
I expressed $$(x^2 -1)^{2n}= \sum_{k=0}^{2n} {2n \choose k}x^{4n-2k}(-1)^k$$ 
And using second formula given, the only term that remains after differentiating 2n times and substituting x=0 is where $$4n-2k=2n$$ so $$2n=2k$$ k=n i.e $$(-1)^n \frac{(2n)!}{(n!)^2} $$ but multiplying this by$$ \frac{1}{2^{2n} (2n)!} $$ doesn't give desired solution. Where have I gone wrong?
 A: \begin{equation}
\begin{split}
P_n(x) &= \frac{1}{2^nn!}[(x+1)^n\cdot(x-1)^n]^{(n)}
\\ &= \frac{1}{2^nn!}\sum_{k=0}^{n}\binom{n}{k}[(x+1)^n]^{(k)} \cdot [(x-1)^n]^{(n-k)}
\\ &= \frac{1}{2^nn!}\sum_{k=0}^{n}\binom{n}{k}\frac{n!}{(n-k)!}(x+1)^{n-k} \cdot \frac{n!}{k!}(x-1)^k
\\ &= \frac{1}{2^n}\sum_{k=0}^{n}\binom{n}{k}^2(x+1)^{n-k}(x-1)^k
\end{split}
\end{equation}
so 
\begin{equation}
\begin{split}
P_{2n}(0) &=\frac{1}{2^{2n}}\sum_{k=0}^{2n}\binom{2n}{k}^2(-1)^k = \frac{1}{2^{2n}}\binom{2n}{n}(-1)^n = \frac{(-1)^n(2n)!}{2^{2n}n!^2}
\end{split}
\end{equation}
and
\begin{equation}
\begin{split}
P_{2n+1}(0) &=\frac{1}{2^{2n+1}}\sum_{k=0}^{2n+1}\binom{2n+1}{k}^2(-1)^k = \frac{1}{2^{2n}}\cdot 0 = 0
\end{split}
\end{equation}
See legendre polynomial problem (pls help!) for the derivation of the value of $\sum_{k=0}^m\binom{m}{k}^2(-1)^k$.
A: This one can also be done using complex variables.

Starting from the generating function
$$\sum_{n\ge 0} P_n(x) t^n
= \frac{1}{\sqrt{1-2xt+t^2}}$$
Call $P_n(0) = Q_n$ so that
$$\sum_{n\ge 0} Q_n t^n
= \frac{1}{\sqrt{1+t^2}}.$$
Now using Lagrange Inversion we get
$$Q_{2n} =
\frac{1}{2\pi i}
\int_{|z|=\epsilon} \frac{1}{z^{2n+1}}
\frac{1}{\sqrt{1+z^2}} \; dz
\\ = \frac{1}{2\pi i}
\int_{|z|=\epsilon} \frac{1}{z^{2n+2}}
\frac{1}{\sqrt{1+z^2}} \; z \; dz.$$
Put $1+z^2 = w^2$ so that $z\; dz = w\; dw$ to obtain
$$2\times \frac{1}{2\pi i}
\int_{|w-1|=\epsilon} \frac{1}{(w^2-1)^{n+1}}
\frac{1}{w} \; w\; dw.$$
The scalar two in front is  because when $z$ makes one turn around the
origin, $w$ makes two, but the contour only counts one turn.
Continuing we have
$$\frac{2}{2\pi i}
\int_{|w-1|=\epsilon} \frac{1}{(w-1)^{n+1}}
\frac{1}{(w+1)^{n+1}} \; dw 
\\ = \frac{2}{2\pi i}
\int_{|w-1|=\epsilon} \frac{1}{(w-1)^{n+1}}
\frac{1}{(2+w-1)^{n+1}} \; dw 
\\ = \frac{1}{2^{n}} \frac{1}{2\pi i}
\int_{|w-1|=\epsilon} \frac{1}{(w-1)^{n+1}}
\frac{1}{(1+(w-1)/2)^{n+1}} \; dw 
\\ = \frac{1}{2^{n}} \frac{1}{2\pi i}
\int_{|w-1|=\epsilon} \frac{1}{(w-1)^{n+1}}
\sum_{q\ge 0} (-1)^q {q+n\choose n} 
\frac{(w-1)^q}{2^q} \; dw
.$$
Extracting coefficients this gives
$$\frac{1}{2^{n}} (-1)^n {2n\choose n} \frac{1}{2^n}.$$
This is
$$\frac{(-1)^n}{4^n} \frac{(2n)!}{(n!)^2}$$
as claimed.
