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