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!
First you factor the bottom into: $$ (z^2 + 1)^2 = (z+i)^2 (z-i)^2. $$ Now for each factor that has a squared term, in this case both of them, you need to have one term of a variable over the factor and another term where the bottom has the factor squared. This is true in general. Therefore, you need to write it as $$ \dfrac{1}{(z^2+1)^2} = \dfrac{A}{z+i} + \dfrac{B}{(z+i)^2} + \dfrac{C}{z-i} + \dfrac{D}{(z-i)^2} $$ and then solve for $A$, $B$, $C$, and $D$ as you would before.