Evaluate $\underset{z=0}{\text{Res}} \; \frac{(z^6-1)^2}{z^5(2z^4 -5z^2 + 2)}$ . Problem:
Evaluate
$$
\underset{z=0}{\text{Res}} \; \frac{(z^6-1)^2}{z^5(2z^4 -5z^2 + 2)}.
$$
My question:
This is a question from a previous complex analysis qualifying exam that I am trying to work through. I know that the straightforward formula for calculating this residue would be
$$
\frac{1}{4!} \lim_{z\to 0} \frac{d^4}{dz^4} \left(z^5 \cdot \frac{(z^6-1)^2}{z^5(2z^4 -5z^2 + 2)} \right)
$$
However, I'm guessing there is a better method in this case than taking four derivatives or trying to turn this into a Laurent series. Can someone point me in the right direction here?
 A: Let $$f(z) = \frac{(z^6-1)^2}{z^5(2z^4 - 5z^2 + 2)}, \quad g(z) = \frac{(z^3-1)^2}{2z^2 - 5z + 2},$$ so that we have $f(z) = g(z^2)/z^5$.  So by computing the series expansion of $g$ about $0$, we can obtain the Laruent expansion of $f$, since $g$ has no singularity at  $0$.
To this end, observe $$2z^2 - 5z + 2 = (2z-1)(z-2) = 2(1-2z)(1-z/2),$$ hence $$\begin{align}
g(z) &= \frac{1}{6}(z^3 - 1)^2 \left( \frac{4}{1-2z} - \frac{1}{1-z/2} \right) \\
&= \frac{1}{6} (z^3 - 1)^2 \sum_{k=0}^\infty 4(2z)^k - (z/2)^k \\
&= \frac{1}{6} (z^6 - 2z^3 + 1) \sum_{k=0}^\infty (2^{k+2} - 2^{-k}) z^k.
\end{align}$$
We specifically need the coefficient of $z^2$ in this expansion, since this yields the coefficient of $z^4$ in $g(z^2)$, which in turn is the coefficient of $1/z$ in the Laurent expansion of $f$.  This corresponds to the choice $k = 2$:  $$g(z) = \cdots + \frac{1}{6}(2^4 - 2^{-2}) z^2 + \cdots.$$  Thus the required coefficient is $21/8$, which is also the desired residue of $f$ at $0$.
A: A variation: It is convenient to use the coefficient of operator $[z^n]$ to denote the coefficient of $z^n$ of a series.

We obtain
\begin{align*}
\color{blue}{\underset{z=0}{\text{Res}}}&\color{blue}{ \; \frac{(z^6-1)^2}{z^5(2z^4 -5z^2 + 2)}}
=[z^{-1}]\frac{\left(z^6-1\right)^2}{z^5\left(2z^4-5z^2+2\right)}\\
&=[z^{4}]\frac{\left(z^6-1\right)^2}{2z^4-5z^2+2}\tag{1}\\
&=\frac{1}{2}[z^{4}]\frac{1}{1+\left(z^4-\frac{5}{2}z^2\right)}\tag{2}\\
&=\frac{1}{2}[z^{4}]\left(1-\left(z^4-\frac{5}{2}z^2\right)+\left(z^4-\frac{5}{2}z^2\right)^2\right)\tag{3}\\
&=\frac{1}{2}\left(-1+\frac{25}{4}\right)\tag{4}\\
&\,\,\color{blue}{=\frac{21}{8}}
\end{align*}
in accordance with other given answers.

Comment:

*

*In (1) we apply the rule $[z^{p-q}]A(z)=[z^p]z^qA(z)$. Here we have $$[z^{-1}]\frac{P(z)}{z^5Q(z)}=[z^{-1}]z^{-5}\frac{P(z)}{Q(z)}=[z^4]\frac{P(z)}{Q(z)}$$


*In (2) we take only the constant term $1$ from the numerator, since other terms do not contribute to $[z^4]$. We also factor out $2$ from the denominator as preparation for the geometric series expansion in the next step.


*In (3) we expand the series up to the third term, since other terms do not contribute to $[z^4]$.


*In (4) we select the coefficient of $z^4$.
Note: The usage of the coefficient of operator $[z^n]$ can be found for instance in section 5.4 in Concrete Mathematics by R.L. Graham, D. Knuth and O. Patashnik or in Generatingfunctionology by H.S. Wilf.
A: For convenience, let $f(z)$ denote
\begin{aligned}
f(z)
&={(z^6-1)^2\over z^5(2z^4-5z^2+2)}={(z^6-1)^2\over z^5(2z^2-1)(z^2-2)} \\
&={(z^6-1)^2\over2z^5}\cdot{1\over(z+\sqrt2)(z-\sqrt2)(z+1/\sqrt2)(z-1/\sqrt2)}.
\end{aligned}
when $z\to0$, we have $(z^6-1)^2=1+O(z^6)$, so $f(z)$ satisfies
$$
f(z)=\underbrace{{1\over2z^5}\cdot{1\over(z+\sqrt2)(z-\sqrt2)(z+1/\sqrt2)(z-1/\sqrt2)}}_{g(z)}+O(z).
$$
By definition of residue, we know that when $\varepsilon>0$ is sufficiently small there is
$$
\underset{z=0}{\operatorname{Res}}f(z)={1\over2\pi i}\oint_{|z|=\varepsilon}g(z)\mathrm dz+O(\varepsilon^2).
$$
As a result, it suffices to work with $g(z)$ instead of $f(z)$ in our task. To proceed, we first calculate the residue of $g(z)$ at $z=\pm\sqrt2$ and $z=\pm1/\sqrt2$:
$$
\underset{z=\sqrt2}{\operatorname{Res}}g(z)=2^{-7/2}\cdot{1\over2\sqrt2\cdot(2-1/2)}={1\over3\cdot2^4}
$$
$$
\underset{z=-\sqrt2}{\operatorname{Res}}g(z)=-2^{-7/2}\cdot{1\over-2\sqrt2\cdot(2-1/2)}={1\over3\cdot2^4}
$$
$$
\underset{z=1/\sqrt2}{\operatorname{Res}}g(z)=2^{3/2}\cdot{1\over(1/2-2)\sqrt2}=-\frac43
$$
$$
\underset{z=-1/\sqrt2}{\operatorname{Res}}g(z)=-2^{3/2}{1\over(1/2-2)(-\sqrt2)}=-\frac43
$$
This indicates that when $R>\sqrt2$, we have
$$
{1\over2\pi i}\oint_{|z|=\varepsilon}g(z)\mathrm dz=\frac83-{1\over3\cdot2^3}+{1\over2\pi i}\oint_{|z|=R}g(z)\mathrm dz.
$$
As $R\to+\infty$ we have $g(z)=O(R^{-9})$, so the latter integral will vanish if we take the limit. Finally, we have
$$
\underset{z=0}{\operatorname{Res}}f(z)=\underset{z=0}{\operatorname{Res}}g(z)=\frac83-{1\over24}={21\over8}.
$$
