Find an interval of convergence and an explicit formula for $f(x)$ Let $f(x) = 1 + 2x + x^2 + 2x^3 +x^4+...$
If $c_{2n} = 1$ and $c_{2n+1} = 2$ $\forall n \ge 0$ find the interval of convergence and an explicit formula for $f(x)$.
The answers are $I = (-1,1)$ and $f(x) = \frac{1 + 2x}{1 - x^2}$
Can anyone please give me an idea how to get it...
Thanks in advance
 A: Hint: Use the geometric series
$$ \sum_{m=0}^{\infty}z^m=\frac{1}{1-z}. $$
Added: Following my comment, first, we need to prove that the series converges absolutely. Now, notice this
$$ 1 + 2|x| + |x^2| + 2|x^3| +|x^4|+...\leq 2 + 2|x| + 2|x^2| + 2|x^3| +2|x^4|+... $$
$$ = 2\sum_{k=0}^{\infty} |x^k| = 2\sum_{k=0}^{\infty} |x|^k = \frac{1}{1-|x|},\quad |x|<1. $$
Thus the series converges absolutely. Now, you ca rearrange the series as
$$ f(x)= \sum_{k=0}^{\infty}x^{2k}+ 2\sum_{k=0}^{\infty}x^{2k+1} .$$
Use the hint and you should be able to finish the problem.
A: The radius of convergence is $\dfrac1{\limsup\limits_{n\to\infty}|a_n|^{1/n}}$ and since $1\le a_n\le2$, the Squeeze Theorem says the radius of convergence is $1$.

$$
\begin{align}
&\hphantom{(}1+2x\hphantom{)}+\hphantom{(}x^2+2x^3\hphantom{)}+\hphantom{(}x^4+2x^5\hphantom{)}+\hphantom{(}x^6+2x^7\hphantom{)}+\dots\\[8pt]
=&(1+2x)+(1+2x)x^2+(1+2x)x^4+(1+2x)x^6+\dots\\[8pt]
=&(1+2x)(1+x^2+x^4+x^6+\dots)\\[4pt]
=&\frac{1+2x}{1-x^2}
\end{align}
$$

$$
\begin{align}
&1+2x+x^2+2x^3+x^4+2x^5+x^6+2x^7+\dots\\[12pt]
=&1+\hphantom{2}x+x^2+\hphantom{2}x^3+x^4+\hphantom{2}x^5+x^6+\hphantom{2}x^7+\dots\\
&\hphantom{1}+\hphantom{2}x\hphantom{\,+\;x^2}+\phantom{2}x^3\hphantom{\,+\;x^4}+\phantom{2}x^5\hphantom{\,+\;x^4}+\phantom{2}x^7\dots\\[4pt]
=&\frac1{1-x}+\frac{x}{1-x^2}\\[9pt]
=&\frac{1+2x}{1-x^2}
\end{align}
$$
