Expand the function $f(z) = \frac{1+2z^2}{z^2+z^4} $ into power series of $z$ in all areas of convergence. I'm studying for my upcoming complex analysis qualifying exam by working through problems in past exams. For this problem, I'd like to know (1) if my answer is correct and complete (i.e. whether I've made any errors/omissions), and (2) if there are any better ways of doing this. I'm specifically curious about whether or not there are other areas of convergence that I need to address. Thanks!
Question:
Expand the function
$$
f(z) = \frac{1+2z^2}{z^2+z^4}
$$
into power series of $z$ in all areas of convergence.
Attempted Solution:
We begin by noting that this function has poles at $z=0$ and $z=\pm i$. Then we proceed by recalling the geometric series
$$
\sum_{k=0}^{\infty} z^k = \frac{1}{1-z},
$$
which converges for $|z|<1$. Using this form, we can rewrite $f(z)$ as follows
\begin{align*}
f(z) &= \frac{1+2z^2}{z^2+z^4} \\
&= \frac{1}{z^2+z^4} + \frac{2z^2}{z^2+z^4} \\
&= \frac{1}{z^2(1-(-z^2))} + \frac{2z^2}{z^2(1-(-z^2))} \\ 
&= \frac{1}{z^2}\left(\frac{1}{1-(-z^2)}\right) + 2\left(\frac{1}{1-(-z^2)}\right)\\
&= \left(\frac{1}{z^2}+2\right)\left(\frac{1}{1-(-z^2)}\right)\\
&= \left(\frac{1}{z^2}+2\right) \sum_{k=0}^{\infty} (-z^2)^k \\
&=  \sum_{k=0}^{\infty} \left(z^{-2}+2\right)(-1)^k z^{2k}
\end{align*}
for $0<|z|<1$, since there is a pole at $z=0$.
 A: Since we are looking for a power series we are looking for a representation
\begin{align*}
f(z)=\sum_{k=0}^\infty a_k\left(z-z_0\right)^k
\end{align*}
evaluated at center $z_0$.

We start with a partial fraction decomposition
\begin{align*}
\color{blue}{f(z)}&=\frac{1+2z^2}{z^2\left(1+z^2\right)}\\
&\,\,\color{blue}{=\frac{1}{z^2}+\frac{i}{2}\,\frac{1}{z+i}-\frac{i}{2}\,\frac{1}{z-i}}\tag{1}
\end{align*}

We have poles at $0$ and $\pm i$. So we can expand each of the terms at $z_0\in\mathbb{C}\setminus\{0,\pm i\}$ in a power series. We obtain
\begin{align*}
\frac{1}{z^2}&=\frac{1}{\left(z-z_0+z_0\right)^2}=\frac{1}{z_0^2}\,\frac{1}{\left(1+\frac{z-z_0}{z_0}\right)^2}\\
&=\frac{1}{z_0^2}\sum_{k=0}^\infty (-1)^k(k+1)\left(\frac{z-z_0}{z_0}\right)^k\qquad\qquad |z-z_0|<|z_0|\tag{2.1}
\\
\frac{i}{2}\,\frac{1}{z+i}&=\frac{i}{2}\,\frac{1}{(z-z_0)+(z_0+i)}\\
&=\frac{i}{2}\,\frac{1}{z_0+i}\,\frac{1}{1+\frac{z-z_0}{z_0+i}}\\
&=\frac{i}{2}\,\frac{1}{z_0+i}\sum_{k=0}^\infty(-1)^k\left(\frac{z-z_0}{z_0+i}\right)^k\qquad\qquad |z-z_0|<|z_0+i|\tag{2.2}
\\
\frac{i}{2}\,\frac{1}{z-i}&=\frac{i}{2}\,\frac{1}{(z-z_0)+(z_0-i)}\\
&=\frac{i}{2}\,\frac{1}{z_0-i}\,\frac{1}{1+\frac{z-z_0}{z_0-i}}\\
&=\frac{i}{2}\,\frac{1}{z_0-i}\sum_{k=0}^\infty(-1)^k\left(\frac{z-z_0}{z_0-i}\right)^k\qquad\qquad |z-z_0|<|z_0-i|\tag{2.3}
\end{align*}

Putting (1) and (2.1) to (2.3) together we conclude $f(z)$ admits the power series representation
\begin{align*}
\color{blue}{f(z)}&=\frac{1+2z^2}{z^2\left(1+z^2\right)}\\
&\,\,\color{blue}{=\sum_{k=0}^\infty(-1)^k\left(\frac{k+1}{z_0^{k+2}}+\frac{i}{2}\frac{1}{(z_0+i)^{k+1}}
-\frac{i}{2}\frac{1}{(z_0-i)^{k+1}}\right)\left(z-z_0\right)^k}\\
\end{align*}
evaluated at $z_0\in\mathbb{C}\setminus\{0,\pm i\}$ and convergent in
\begin{align*}
\{z\in\mathbb{C}: |z-z_0|<|z_0| \text{ and } |z-z_0|<|z_0+i| \text{ and } |z-z_0|<|z_0-i|\}
\end{align*}

A: Yes, that's perfect. Note that you can even simplifie more your expression:
$$\sum_{k=0}^{\infty} \left(z^{-2}+2\right)(-1)^k z^{2k}=\sum_{k=0}^{\infty}(-1)^kz^{2(k-1)}+2\sum_{k=0}^{\infty}(-1)^kz^{2k}=\\\sum_{k=-1}^{\infty}(-1)^{k+1}z^{2k}+2\sum_{k=0}^{\infty}(-1)^kz^{2k}\\=\frac{1}{z^2}+\sum_{k=0}^{\infty}(-1)^{k+1}z^{2k}+2\sum_{k=0}^{\infty}(-1)^kz^{2k}=\frac{1}{z^2}-\sum_{k=0}^{\infty}(-1)^kz^{2k}+2\sum_{k=0}^{\infty}(-1)^kz^{2k}\\=\frac{1}{z^2}+\sum_{k=0}^{\infty}(-1)^kx^{2k}=\frac{1}{z^2}+1-z^2+z^4+O(z^6)$$
Note that the residue of $f$ in $z=0$ since $a_{-1}=0$
