Getting the incorrect residue for this function? I am trying to compute 
$$Res_{z=i}\frac{z^{2}}{(z+i)^{2}(z-i)^{2}}$$
I made 
$$\phi(z)=\frac{z^{2}}{(z+i)^{2}}$$
Then
$$Res_{z=i}\frac{z^{2}}{(z+i)^{2}(z-i)^{2}}=\frac{\phi^{(2-1)}(i)}{(2-1)!}={\phi^{(1)}(i)}$$
Since $z_{0} = i$ is a pole of order 2.
Next I tried computing the derivative of $\phi(z)$ using the quotient rule. 
$$\phi^{1}(z)=\frac{2z(z+i)^{2}-2(z+i)(z^2)}{(z+i)^{2}}$$
Now when I plug in $z=i$ here is what I get
$$\phi^{1}(i)=\frac{2i(2i)^{2}-2(2i)(i^2)}{(2i)^{2}}=\frac{-8i+4i}{-4}=i$$
The problem is that this is the incorrect residue. The answer is supposed to be $-\frac{i}{4}$. I'm not sure where I messed up. 

The derivative was taken incorrectly.  Note that
$$\frac{d}{dz}\left(\frac{z^2}{(z+i)^2}\right)=\frac{2z(z+i)^2-2z^2(z+i)}{(z+i)^\color{blue}4}$$
