calcuating residue of a complex function I need to calculate the residue of the function $\frac{(z^6+1)^2}{(z^5)(z^2-2)(z^2-\frac{1}{2})}$ at $z$=0.
z=0 is  a pole of order 5 so I tried using the general formula to calculate the residue but the calculation becomes very tedious since it involves finding the fourth derivative of the complex function. I even tried writing the laurent series but that too got me nowhere. Could anyone please tell how to proceed with this problem?
 A: Take the Taylor series of ${1\over z^2 -2}$ and the Taylor series of ${1\over z^2-1/2}$ and multiply them to get the first few terms.  Multiplying the result by $(z^6+1)^2$ won't change the terms up to degree $4$, so we can ski this step.  Then divide by $z^5$.  No derivatives required. 
EDIT Actually, we only have to computer the coefficient of $z^4$ in the first step.  I wrote the first sentence before I realized that the numerator wouldn't change anything significant. 
A: Hints:
You may proceed as follows:


*

*$\frac{(z^6+1)^2}{(z^5)(z^2-2)(z^2-\frac{1}{2})} = \frac{z^{12} + 2z^6 + 1}{(z^5)(z^2-2)(z^2-\frac{1}{2})}
= $$ $$ \frac{z^{7}}{(z^5)(z^2-2)(z^2-\frac{1}{2})} + \frac{2z}{(z^2-2)(z^2-\frac{1}{2})} + \frac{1}{(z^5)(z^2-2)(z^2-\frac{1}{2})}$
Since the first summands are holomorphic at $z=0$ you only have to calculate the residue for the last term.
Now, use the formula:


*

*$Res_{z=0}f(z) = \frac{1}{4!}\lim_{z\to 0}\frac{d^4}{dz^4}\frac{z^5}{(z^5)(z^2-2)(z^2-\frac{1}{2})} = \frac{1}{4!}\lim_{z\to 0}\frac{d^4}{dz^4}\frac{1}{(z^2-2)(z^2-\frac{1}{2})}$
Before differentiating split up the fraction into its partial fractions:
$$\frac{1}{(z^2-2)(z^2-\frac{1}{2})} = \frac{2}{3(z^2-2)} - \frac{4}{3(z^2-\frac{1}{2})}$$ $$= \frac{1}{3\sqrt{2}}\left( \frac{1}{z - \sqrt{2}} + \frac{1}{z + \sqrt{2}}\right) - \frac{\sqrt{2}}{3}\left(\frac{1}{z - \frac{1}{\sqrt{2}}} + \frac{1}{z + \frac{1}{\sqrt{2}}} \right)$$
Now, differentiating is straight forward and plug in $z= 0$ at the end. (Do not forget to multiply by $\frac{1}{4!}$ at the end.)
A: In order to get the residue of the function at $z=0$ we calculate the coefficient  of $z^{-1}$ of the  Laurent series expansion. We use the coefficient of  operator $[z^n]$  to denote the coefficient of $z^n$.

We obtain
  \begin{align*}
\color{blue}{[z^{-1}]}&\color{blue}{\frac{\left(z^6+1\right)^2}{z^5\left(z^2-2\right)\left(z^2-\frac{1}{2}\right)}}\\
&=[z^4]\frac{\left(z^6+1\right)^2}{(-2)\left(1-\frac{z^2}{2}\right)\left(-\frac{1}{2}\right)\left(1-2z^2\right)}\tag{1}\\
&=[z^4]\left(1+\frac{z^2}{2}+\frac{z^4}{4}\right)\left(1+2z^2+4z^4\right)\tag{2}\\
&=4+1+\frac{1}{4}\tag{3}\\
&\,\,\color{blue}{=\frac{21}{4}}
\end{align*}

Comment:


*

*In (1) we apply the rule $[z^{p-q}]A(z)=[z^p]z^qA(z)$.   We also factor out constants to normalise terms  in the  denominator.

*In (2) we  replace the  term  $(z^6+1)^2$ in  the numerator with  $1$ since other terms do not contribute  to $[z^4]$.   We also  expand $\frac{1}{1-az^2}=1+az^2+a^2z^4+O(z^6)$  up to  terms of $z^4$ since       other     terms do not       contribute.

*In  (3)  we   extract      the        coefficients     of   $z^4$.
