Math Help - Laurent Expansion of function

1. Laurent Expansion of function

I want to find the Laurent expansion(i.e. the Laurent series) of $\frac{z^2-1}{z^2+1}$
a) in the domain $0 < |z-i| < 1$
b) in the domain $|z+i| > 2$

I know the solution in a) is $\frac{z^2-1}{z^2+1}= \frac{i}{z-i} +\frac{1}{2} -\frac{1}{2}\sum_{n=1}^{\infty}(\frac{i}{2})^n (z-i)^n$

And in b) it is $\frac{z^2-1}{z^2+1}= 1 + i\sum_{n=-2}^{-\infty}(2i)^{-n-1} (z+i)^n$

But why is that so?

2. I will leave the details to you but this should get you started.

$\frac{1}{z^2+1}=\frac{1}{(z+i)(z-i)}$

Now if I factor out (z-i) this gives

$\frac{1}{(z-i)}\cdot \frac{1}{(z+i)}=\frac{1}{(z-i)}\cdot \frac{1}{(z-i+2i)}$

Now we factor a 2i out to get

$\frac{1}{(2i)(z-i)}\cdot \frac{1}{(1+\frac{z-i}{2i})}$

Now if we expand this in a geometric series we get

$\frac{1}{(2i)(z-i)}\sum_{n=0}^{\infty} \left(\frac{-(z-i)}{2i}\right)^n$

Simplifying gives

$\frac{1}{(2i)(z-i)}\sum_{n=0}^{\infty} \left(\frac{i}{2}\right)^n(z-i)^n=\frac{1}{(4)}\sum_{n=0}^{\infty} \left(\frac{i}{2}\right)^{n-1}(z-i)^{n-1}$

Notice that

$\frac{z^2-1}{z^2+1}=\frac{z^2+1-2}{z^2+1}=1-2\left( \frac{1}{z^2+1}\right)$

From here just plug in and take two terms out of the series and reindex.

The 2nd one is very similar but here is a hint

$\frac{1}{z^2+1}=\frac{1}{(z+i)(z-i)}=\frac{1}{(z+i)}\cdot \frac{1}{z+i-2i}=\frac{1}{(z+i)^2}\cdot \frac{1}{1-\frac{2i}{z+i}}$

Now expand this in a geometric series