I have to expand at $z_0 = 1$ the following function, all over the complex plane
$$f(z) = \frac{1}{z^2+1}$$
The answer is said to be
$$\sum_{k = 0}^{+\infty} (-1)^k 2^{- \frac{k+1}{2}}\sin\left(\frac{\pi}{4}(k+1)\right)(z-1)^k$$
For $|z-1| < \sqrt{2}$
But am having hard times in getting the answer.
My first reasoning was this: rewriting
$$f(z) = \frac{1}{z^2 - 1 + 2} = \frac{1}{2}\frac{1}{1 - \left(-\frac{(z^2-1)}{2}\right)}$$
And then apply the geometric series, but this doesn't work. Also I don't get why this should be wrong, since "what matters" should be that $z^2-1 < 2$, but apparently I am very wrong.
Any hint?
Thank you!
$$\frac1{z^2+1}=\frac1{2i}\left(\frac1{z-i}-\frac1{z+i}\right)=\frac1{2i}\left(\frac1{(z-1)+1-i}-\frac1{(z-1)+1+i}\right)=$$
$$\frac1{2i}\left(\frac1{1-i}\cdot\frac1{1+\frac{z-1}{1-i}}-\frac1{1+i}\cdot\frac1{1+\frac{z-1}{1+i}}\right)$$
and then: for
$$\left|\frac{z-1}{1\pm i}\right|<1\iff|z-1|<|1\pm i|=\sqrt2\;,\;\;\text{we get}$$
$$\frac1{z^2+1}=\frac1{2i}\left(\frac1{1-i}\sum_{n=0}^\infty\frac{(-1)^n(z-1)^n}{(1-i)^n}-\frac1{1+i}\sum_{n=0}^\infty\frac{(-1)^n(z-1)^n}{(1+i)^n}\right)=\ldots$$
Take it now from here.