extract Catalan numbers from generating function via residues

Consider the catalan numbers $$C_n=\frac{1}{n+1}\binom{2n}{n}$$, which have the following generating function:

$$C(x)=\sum_{n=0}^{\infty}C_nx^n=\frac{1-\sqrt{1-4x}}{2x}.$$

I am well aware of the usual proofs of this identity: for example, one can write $$C(x)$$ as the root of a quadratic equation via combinatorial identities, or one can Taylor-expand $$\sqrt{1-4x}$$.

I am wondering if there is a way to start from $$C(x)=\frac{1-\sqrt{1-4x}}{2x}$$ and extract the Taylor coefficients via residue calculus. That is, if there is a direct way to evaluate the integral

$$\oint_{C}\frac{1-\sqrt{1-4z}}{2z^{n+1}}dz$$

for some appropriately chosen $$C$$.

The solution could have been much shorter, but I prefer details to concision.

One wants to show that $$C_n=\frac1{2\pi i}\oint_{C}\frac{1-\sqrt{1-4z}}{2z}\frac{dz}{z^{n+1}}$$

It is easy to see $$\oint_{C}\frac{1-\sqrt{1-4z}}{2z}\frac{dz}{z^{n+1}}=-\frac12\oint_{C}\frac{\sqrt{1-4z}}{z^{n+2}}dz$$

Definitions

We will take the branch cut of $$\sqrt{1-4z}$$ on $$\mathbb R_{\ge1/4}$$, i.e. $$\sqrt{1-4z}=\exp\bigg[\frac{\ln|1-4z|+i\arg(1-4z)}2\bigg]\qquad{\arg(1-4z)\in[-\pi,\pi)}$$

I will show how to evaluate

$$I_n:=\oint_C\sqrt{1-4z}~~ z^{-n-2}dz$$ directly.

Decomposing the contour integral

Take $$C$$ to be the keyhole contour centered at $$1/4$$ which avoids the branch cut.

The two integrals, one around branch point and one along the infinitely large circle, vanish.

The integral above the real axis $$I^+$$ is (using the parametrization $$z=\frac14+te^{i\theta}$$, under the limit $$\theta\to0^+$$)

\begin{align} I^+ &=\lim_{\theta\to0^+}\int^\infty_0\frac{\sqrt{1-4(1/4+te^{i\theta})}} {(1/4+te^{i\theta})^{n+2}}e^{i\theta}dt \\ &=\int^\infty_0\frac{\lim_{\theta\to0^+}\sqrt{4te^{i(\theta-\pi)}}} {(1/4+t)^{n+2}}dt \\ &=-2i\int^\infty_0\frac{\sqrt{t}}{(1/4+t)^{n+2}}dt \\ \end{align}

The integral below the real axis $$I^-$$ is (using the parametrization $$z=\frac14+te^{i\theta}$$, under the limit $$\theta\to2\pi^-$$) \begin{align} I^- &=\lim_{\theta\to2\pi^-}\int_\infty^0\frac{\sqrt{1-4(1/4+te^{i\theta})}}{(1/4+te^{i\theta})^{n+2}}e^{i\theta}dt \\ &=\int_\infty^0\frac{\lim_{\theta\to2\pi^-}\sqrt{4te^{i(\theta-\pi)}}}{(1/4+t)^{n+2}}dt \\ &=-2i\int^\infty_0\frac{\sqrt{t}}{(1/4+t)^{n+2}}dt=I^+ \end{align}

Therefore, $$I_n\equiv I^+ + I^-=2I^+=-4i\displaystyle{\int^\infty_0\frac{\sqrt{t}}{(1/4+t)^{n+2}}dt}$$.

Evaluating $$I_n$$ directly

By the substitution $$u=\frac1{1+4t}$$, \begin{align} \frac1{-4i}I_n &=\int^\infty_0\frac{\sqrt{t}}{(1/4+t)^{n+2}}dt \\ &=2^{2n+1}\int^1_0\sqrt{1-u}~~u^{n-1/2}du \\ &=2^{2n+1}B\left(\frac32,n+\frac12\right)\\ &=2^{2n+1}\cdot\Gamma(3/2)\cdot\Gamma(n+1/2)\cdot\frac1{\Gamma(n+2)}\\ &=2^{2n+1}\cdot\frac{\sqrt\pi}{2}\cdot\frac{(2n)!}{2^{2n}n!}\sqrt\pi\cdot\frac1{n+1}\frac1{n!}\\ &=\pi\cdot\frac1{n+1}\binom{2n}{n}\\ I_n&=\frac{-4\pi i}{n+1}\binom{2n}{n}\\ \end{align}

Assembling

$$\oint_{C}\frac{1-\sqrt{1-4z}}{2z^{n+2}}dz=-\frac12\oint_{C}\frac{\sqrt{1-4z}}{z^{n+2}}dz=-\frac12I_n$$ $$=-\frac12\cdot\frac{-4\pi i}{n+1}\binom{2n}{n}=2\pi i\frac1{n+1}\binom{2n}{n}$$

Thus, $$\color{red}{\oint_{C}\frac{1-\sqrt{1-4z}}{2z}\frac{dz}{z^{n+1}}=2\pi i~C_n}$$ as expected.

With the functional equation

$$C(z) = 1 + z C(z)^2$$

and the solution

$$C(z) = \frac{1-\sqrt{1-4z}}{2z}$$

we may choose the branch cut of the square root to be $$(1/4, +\infty)$$ so that we have an analytic function in the neighborhood of the origin and the Cauchy Coefficient Formula applies.

We have

$$n C_n = [z^{n-1}] C'(z) = \frac{1}{2\pi i} \int_{|z|=\epsilon} \frac{1}{z^n} C'(z) \; dz.$$

With the substitution $$C(z) = w$$ we get that $$z = (w-1)/w^2$$ so that

$$n C_n = \frac{1}{2\pi i} \int_{|w-1|=\gamma} \frac{w^{2n}}{(w-1)^n} \; dw \\ = \frac{1}{2\pi i} \int_{|w-1|=\gamma} \frac{1}{(w-1)^n} \sum_{q=0}^{2n} {2n\choose q} (w-1)^q \; dw \\ = {2n\choose n-1}.$$

We thus have

$$C_n = \frac{1}{n} {2n\choose n-1} = \frac{1}{n+1} {2n\choose n}$$

as required. This was for $$n\ge 1$$ and we see that this last formula also yields the correct value for $$n=0.$$ Here we have made use of the fact that $$C(z) = 1 + z + \cdots$$ so the image contour of the circle $$|z|=\epsilon$$ can be deformed to a circle $$|w-1|=\gamma$$ making a single turn. The chosen branch cut in fact corresponds to the principal branch of the logarithm with argument $$(-\pi, \pi].$$