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?
 A: 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$
A: It's also convenient to perform a partial fraction decomposition followed by a binomial series expansion.

We obtain by partial fraction decomposition
  \begin{align*}
\frac{z^2}{(z+i)(z-i)^2}&=\frac{1}{4(z+i)}+\frac{3}{4(z-i)}+\frac{i}{2(z-i)^2}\\
&=-\frac{i}{4}\cdot\frac{1}{1-iz}+\frac{3i}{4}\cdot\frac{1}{1+iz}-\frac{i}{2}\cdot\frac{1}{(1+iz)^2}\tag{1}\\
&=-\frac{i}{4}\sum_{n\geq 0}\left(iz\right)^n+\frac{3i}{4}\sum_{n\geq 0}\left(-iz\right)^n
-\frac{i}{2}\sum_{n\geq 0}\binom{-2}{n}\left(iz\right)^n\tag{2}\\
&=\sum_{n\geq 0}\left(-\frac{1}{4}+\frac{3}{4}(-1)^n-\frac{1}{2}(n+1)(-1)^n\right)i^nz^n\tag{3}\\
&=\sum_{n\geq 0}\left(\frac{2n-1}{4}(-1)^{n+1}-\frac{1}{4}\right)i^{n+1}z^n
\end{align*}

Comment:


*

*In (1) we apply geometric series expansion and binomial series expansion

*In (2) we do some rearrangement and use the identity $\binom{-p}{q}=\binom{p+q-1}{q}(-1)^q$ with $p=2$

*In (3) we do some final rearrangement
