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?

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
