Compute $\displaystyle\int_{|z-i|=1}\frac{\log(z+4)}{(z^2+1)^2}$
As I see it there are two possibilities:
- $g(z)=\frac{\log(z+4)}{(z+i)^2}$ is holomorphic on $D_1(i)$, so we have
$\displaystyle\int_{|z-i|=1}\frac{\log(z+4)}{(z^2+1)^2}=\oint_{|z-i|=1}\frac{g(z)}{(z-i)^2}=2\pi i\frac{d}{dz}\left(g(z)\right)\mid_{z=i}$
- Also we see that $z=i$ is an isolated singularity in $D_1(i)$ with winding number 1, so we have
$\displaystyle\int_{|z-i|=1}\frac{\log(z+4)}{(z^2+1)^2}=2\pi i\text{Res}_i\left(\frac{\log(z+4)}{(z^2+1)^2}\right)$
and since $z=i$ is a pole of order 2 we can obtain the residue via
$\displaystyle \frac{d}{dz}\left((z-i)^2f(z)\right)\mid_{z\to i}=\frac{2\log(z+4)}{(z-i)(z+i)^2}\mid_{z\to i}+\frac{\log(z+4)}{(z+i)^2}\mid _{z\to i}$
Now I see that I must have done something wrong since the first summand is problematic.
Both forms are indeed equivalent. Simply note that
$$\begin{align} \frac{d}{dz}\left((z-i)^2f(z)\right)&=2(z-i)f(z)+(z-i)^2f'(z)\\\\ &=2(z-i)\frac{\log(z+4)}{(z^2+1)^2}+(z-i)^2\left(\frac{1}{(z+4)(z^2+1)^2}-\frac{4z\log(z+4)}{(z^2+1)^3}\right)\\\\ &=\frac{1}{(z+4)(z+i)^2}+\frac{2\log(z+4)}{(z+i)^3}\left(\frac{z+i}{z-i}-\frac{2z}{z-i}\right)\\\\ &=\frac{1}{(z+4)(z+i)^2}-\frac{2\log(z+4)}{(z+i)^3}\\\\ &=\frac{d}{dz}\left(\frac{\log(z+4)}{(z+i)^2}\right) \end{align}$$
as was to be shown!