I'm trying to determine the residue at $i$ of $f(z)=\frac{1}{(z^2+1)^2}$. My first attempt was to transform this into a Laurent Series:
$$f(z)=\frac{1}{(z^2+1)^2}=\frac{1}{(z+i)^2(z-i)^2}$$
individually analysing the roots (using the properties of the geometric series, for $|z|<1$):
$$\frac{1}{z+i}=\frac{i}{zi-1}=\frac{-i}{1-zi}=-i\sum_{n=0}^\infty(zi)^n=\sum_{n=0}^\infty (-1)\cdot i^{n+1}z^n$$
$$\frac{1}{z-i}=\frac{i}{zi+1}=\frac{i}{1-(-zi)}=i\sum_{n=0}^\infty(-zi)^n=\sum_{n=0}^\infty i(-i)^{n}z^n$$
But I can't really tell how to determine the initial function and find the residue with this approach.
Is there an alternative way of determining this?
There are two approaches to this. One is to use the Laurent series as you have stated here, but we need to expand around $i$ instead of $0$. To do this, we know the series of
$$\frac{1}{z+i}=\frac{1}{(z-i)+2i}=\frac{1}{2i}\frac{1}{1+\frac{z-i}{2i}}=\frac{1}{2i}\sum_{n=0}^\infty\left(-\frac{z-i}{2i}\right)^n$$
The derivative is then
$$-\frac{1}{(z+i)^2}=\frac{1}{2i}\sum_{n=0}^\infty n\left(-\frac{z-i}{2i}\right)^{n-1}\left(-\frac{1}{2i}\right)=\frac{1}{4}\sum_{n=0}^\infty(n+1)\left(-\frac{z-i}{2i}\right)^n$$
This gives us
$$\frac{1}{(z^2+1)^2}=\frac{1}{(z-i)^2}\frac{1}{(z+i)^2}=-\frac{1}{4}\frac{1}{(z-i)^2}\sum_{n=0}^\infty(n+1)\left(-\frac{z-i}{2i}\right)^n$$
The residue is when $n=1$, as this gives the term where $z-i$ is to the power $-1$, and we have
$$-\frac{1}{4}(2)\left(-\frac{1}{2i}\right)=-\frac{i}{4}$$
The second approach is using derivatives. This function as a pole of order $2$ at $i$ and we can compute the residue using this fact. To find the residue of a pole of order $k$ we compute
$$Res_w(f)=\frac{1}{(k-1)!}\frac{d^{k-1}}{dz^{k-1}}(z-w)^kf(z)\Big|_{w}$$
In other words, we multiply by $(z-i)^2$, take a derivative, then evaluate at $i$. This gives
$$\frac{d}{dz}\frac{1}{(z+i)^2}\Big|_i=\frac{-2}{(z+i)^3}\Big|_i=\frac{-2}{-8i}=-\frac{i}{4}$$