<s>[INST] 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$.
 [/INST] 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$
</s>