<s>[INST] Finding the power series of a complex function So I have the function
$$\frac{z^2}{(z+i)(z-i)^2}.$$

I want to determine the power series around $z=0$ of this function.

I know that the power series is $\sum_{n=0}^\infty a_n(z-a)^n$, where $a_n=\frac{f^{(n)}(a)}{n!}$. But this gives me coefficients, how can I find a series for this?
Edit: maybe we can use partial fractions?
 [/INST] Note that: $$\frac{z^2}{(z+i)(z-i)^2}\equiv \frac{z^2(z+i)}{(z^2+1)^2}$$
This means, that I would need to only find the power series of $\displaystyle\frac1{(z^2+1)^2}$.
We have: $$\frac1{1-x}\equiv\sum_{n\mathop=0}^\infty x^n$$
Taking derivative of both sides: $$\frac{-1}{(1-x)^2}\equiv\sum_{n\mathop=0}^\infty nx^{n-1}\equiv\sum_{n\mathop=0}^\infty (n+1)x^n$$
Substituting $x=-z^2$: $$\frac{-1}{(1+z^2)^2}\equiv\sum_{n\mathop=0}^\infty (n+1)(-z^2)^n\equiv\sum_{n\mathop=0}^\infty (n+1)(iz)^{2n}$$
Multiplying both sides by $-z^2(z+i)$: $$\frac{z^2(z+i)}{(1+z^2)^2}\equiv(z+i)\sum_{n\mathop=0}^\infty (n+1)(iz)^{2n+2}\equiv(z+i)\sum_{n\mathop=1}^\infty n(iz)^{2n}$$
Distributing: $$\frac{z^2(z+i)}{(1+z^2)^2}\equiv\sum_{n\mathop=1}^\infty i^{2n}nz^{2n+1}+\sum_{n\mathop=1}^\infty i^{2n+1}nz^{2n}$$
Combining: $$\frac{z^2(z+i)}{(1+z^2)^2}\equiv\sum_{n\mathop=1}^\infty (-i)^{2n}nz^{2n+1}+\sum_{n\mathop=1}^\infty (-i)^{2n-1}nz^{2n}$$
$\displaystyle\equiv\sum_{n\mathop=\mbox{odd}}^\infty (-i)^{n+1}\frac{n+1}2z^{n+2}+\sum_{n\mathop=\mbox{even from 0}}^\infty (-i)^{n+1}\frac {n+2}2z^{n+2}$
$\displaystyle\equiv\sum_{n\mathop=\mbox{odd}}^\infty (-i)^{n+1}\left\lceil\frac n2+1\right\rceil z^{n+2}+\sum_{n\mathop=\mbox{even from 0}}^\infty (-i)^{n+1}\frac {n+2}2z^{n+2}$
$\displaystyle\equiv\sum_{n\mathop=0}^\infty (-i)^{n+1}\left\lceil\frac n2+1\right\rceil z^{n+2}$
$\displaystyle\equiv\sum_{n\mathop=2}^\infty (-i)^{n-1}\left\lceil\frac n2\right\rceil z^n$
</s>