Normally generating functions are tools of discrete mathematics and integrals deal with continuous structures. A book offered the following formula without much explanation and I'm not able to understand it.
$$[z^n]G(z) = \frac{1}{2\pi i}\oint_{|z|=r} \frac{G(z)dz}{z^{n+1}}$$ $G(z)$ converges for $z = z_0$ and $0 \lt r\lt |z_0|$. From the denominator, I see that Cauchy's formula has been used. But, I don't see how to use it in generating functions. My main question is how can Cauchy's formula help in extracting a coefficient ? Please offer some exposition.
Suppose
$G(z)=g_{0}+g_{1}z+g_{2}z^{2}+\ldots$
If you take the $n$th derivative of $G(z)$ and evaluate it at $z=0$, you get $n!$ times the coefficient $g_{n}$. Thus evaluating derivatives of $G(z)$ at $z=0$ is a way to get at the coefficients $g_{n}$.
For example,
$G'''(z)=6g_{3}+24g_{4}z+60g_{5}z^{2}+\ldots$
and $G'''(0)=6g_{3}$.
The formula given in your question is simply Cauchy's formula for evaluating the $n$th derivative of $G(z)$ at $z=0$ (with the factor of $n!$ taken care of.)