For even positive integer n find the following sum : $\binom{n}{0}^{2}-2\binom{n}{1}^{2}+3\binom{n}{2}^{2}+...+(-1)^{n}(n+1)\binom{n}{n}^{2}$
Here's what i did: Closed form of the series is $\sum_{r=0}^{n}(-1)^{r}(r+1)\binom{n}{r}^{2}$ which is equal to $\sum_{r=0}^{n}(-1)^{r}r\binom{n}{r}^{2}+\sum_{r=0}^{n}(-1)^{r}\binom{n}{r}^{2}$. For even n, the second sum is the coefficient of $x^{n}$ in $(1-x^{2})^{n}$ which is $(-1)^{n/2}\binom{n}{n/2}$. The first one (and there's my doubt) can be written as $\sum_{r=0}^{n}(-1)^{r}\binom{n-1}{r-1}^{2}$ using $\binom{n}{r}$=$\frac{n}{r}\binom{n-1}{r-1}$and then the sum is the coefficient of $x^{n-1}$ in $(1-x^{2})^{n-1}$ which is 0 for even n as $\binom{n}{r}$ is defined for non negative integers. My answer doesn't match with the book. Where am I wrong?
For $n=0,1$ the answer is trivial, so with $n>1$ $$(1+e^{ix})^n=\sum_{k=0}^n{n\choose k}e^{ikx}\tag{1}$$ and it's derivative is $$\dfrac{d}{dx}(1+e^{ix})^ne^{ix}=\sum_{k=0}^n{n\choose k}(i)(k+1)e^{i(k+1)x}$$ or $$(1+e^{ix})^{n-1}(ne^{ix}+e^{ix}+1)=\sum_{k=0}^n{n\choose k}(k+1)e^{ikx}\tag{2}$$ multiply $(1)$ and $(2)$ and then integrate from $0$ to $2\pi$ : $$ \int_0^{2\pi}(1+e^{ix})^{n-1}(ne^{ix}+e^{ix}+1)(1-e^{-ix})^{n}\,dx = \int_0^{2\pi}\sum_{k=0}^n{n\choose k}(k+1)e^{ikx}\sum_{\ell=0}^n{n\choose \ell}(-1)^\ell e^{-i\ell x}\,dx $$ every factor $\int_0^{2\pi}e^{ikx}e^{-i\ell x}\,dx=0$ for $k\neq\ell$ and $\int_0^{2\pi}e^{ikx}e^{-i\ell x}\,dx=2\pi$ for $k=\ell$ then $$I=\sum_{k=0}^n{n\choose k}^2(-1)^k(k+1)2\pi$$ where \begin{align} I &= \int_0^{2\pi}(1+e^{ix})^{n-1}(ne^{ix}+e^{ix}+1)(1-e^{-ix})^{n}\,dx \\ &= (2i)^{n-1}n\int_0^{2\pi}\sin^{n-1}x\cos x\,dx + (2i)^{n-1}(n+2)i\int_0^{2\pi}\sin^nx\,dx - (2i)^{n-1}n\int_0^{2\pi}\sin^{n-1}x\,dx \end{align} the first integral is zero and for integer $n$ one of next integrals is zero as well. For our purpose $n=2k$ we see $\displaystyle\int_0^{2\pi}\sin^{2k-1}x\,dx=0$ and $$\int_0^{2\pi}\sin^{2k}x\,dx=\int_0^{2\pi}\left(\dfrac{e^{ix}-e^{-ix}}{2i}\right)^{2k}\,dx=\int_0^{2\pi}(-1)^k{2k \choose k}\left(\dfrac{1}{2i}\right)^{2k}\,dx=\dfrac{(-1)^k}{(2i)^{2k}}{2k \choose k}2\pi$$ which concludes $$\sum_{k=0}^n{n\choose k}^2(-1)^k(k+1)=\color{blue}{(-1)^k(k+1){2k \choose k}}$$