I want to calculate the residue at $z=i$ for $f(z)=\frac{1}{(z^2+1)(z^2+9)(z^4+4)}$.
I've calculated the residue correctly by using the formula $Res(f;i)=\lim_{z\to i}{(z-i)f(z)}$.
I also know that it is possible to use the formula: $Res(f;i)=\frac{P(i)}{Q'(i)}=\frac{1}{D((z^2+1)(z^2+9)(z^4+4))|_{z=i}}$
But in the solution to the problem the following calculation is done:
$Res(f;i)=\frac{1}{(z^2+9)(z^4+4)D(z^2+1)|_{z=i}}$
Greatful if anyone can show me how this formula follows from the other two formulas, or give me another explanation to why it works.