How do I show that $\sum_{k = 0}^n \binom nk^2 = \binom {2n}n$?

I am not sure if you consider this proof analytic: Write $D = d/dx$. From the Leibniz rule, we have

\begin{align*} \frac{(2n)!}{n!} = D^n x^{2n} |_{x=1} &= D^n (x^n \cdot x^n) |_{x=1} \\ &= \sum_{k=0}^{n} \binom{n}{k} (D^k x^n)(D^{n-k} x^n) |_{x=1} \\ &= \sum_{k=0}^{n} \binom{n}{k} \frac{n!}{(n-k)!} \frac{n!}{k!}. \end{align*}

Then the identity follows by dividing both sides by $n!$ and simplifying it.


A combinatorial proof

How many ways can we pick $n$ objects from a selection of $2n$?

Consider the $2n$ objects to be $$(1,1), (1,2), (2,1), (2,2), \dots, (n, 1), (n, 2)$$

Then the number of ways we can pick out $n$ of these is equal to the number of ways we can pick out $n$ conditioning on how many we select with second coordinate $1$. That is, $$\sum_{k=0}^n \text{ways to select $k$ with $1$-coordinate} \times \text{ways to select $n-k$ with $2$-coordinate}$$

The summand is clearly $$\binom{n}{k} \times \binom{n}{n-k}$$ But that is $$\binom{n}{k} \times \binom{n}{k} = \binom{n}{k}^2$$


A Complex-Analytic (~Algebraic) Proof

For $z\in\mathbb{C}\setminus\{0\}$, $\sum\limits_{k=0}^n\,\binom{n}{k}\,\frac{(1+z)^n}{z^{k+1}}=\frac{(1+z)^n}{z}\,\sum\limits_{k=0}^n\,\binom{n}{k}\,\frac{1}{z^k}=\frac{(1+z)^n}{z}\,\left(1+\frac{1}{z}\right)^n=\frac{(1+z)^{2n}}{z^{n+1}}$. Thus, if $\gamma$ is a curve that counterclockwise wounds around the origin once, then $$\begin{align} \sum_{k=0}^n\,\binom{n}{k}^2=\sum_{k=0}^n\,\binom{n}{k}\,\binom{n}{k}&=\sum\limits_{k=0}^n\,\binom{n}{k}\,\left(\frac{1}{2\pi\mathrm{i}}\,\oint_{\gamma}\,\frac{(1+z)^n}{z^{k+1}}\,\text{d}z\right) \\&=\frac{1}{2\pi\mathrm{i}}\,\oint_{\gamma}\,\sum\limits_{k=0}^n\,\binom{n}{k}\,\frac{(1+z)^n}{z^{k+1}}\text{d}z \\&=\frac{1}{2\pi\mathrm{i}}\,\oint_{\gamma}\,\frac{(1+z)^{2n}}{z^{n+1}}\text{d}z=\binom{2n}{n}\,. \end{align}$$