<s>[INST] 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?
 [/INST] 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.)
</s>