I have the following expansions but I don't know how my teacher gets them. Apparently there is a formula for it (though the guy who told me didn't know it well), but I cannot find it in my notes.
For example, let $z$ be a complex number. Then,
$$\frac{1}{z^2+1}=\frac{i/2}{z+i}-\frac{i/2}{z-i}$$
It makes total sense to me in this case, but I get completely confused in this second case:
$$\frac{1}{(z^2+1)^2}=\frac{i/4}{z+i}-\frac{1/4}{(z+i)^2}-\frac{i/4}{z-i}-\frac{1/4}{(z-i)^2}$$.
What is/are the formulas that I need to compute this? Thanks!