I'm confused by the textbook. They give a big formula for the Laurent series expansion, however, in the examples, they don't use the formula at all. Here is one of the examples:
My questions: Why can we find the residue in this way? Which function, $f(z)$ or $g(z)$, should we pick to calculate the Maclaurin series representation? For example, I would like to find the residue of $\frac{1}{e^{2z}-1}$ and $\frac{z^2}{1-\cos(z)}$. Answer to any one of my questions is appreciated!
Definition of Laurent series representation (am I correct to call it the definition?):


