What is the sum of the series? How to find the sum of the series $$\sum_{n=0}^\infty \frac {x^{3^n}+(x^{3^n})^2} {1-x^{3^{n+1}}}$$ under the assumptions $x >0,\,x\neq 1,$ in a closed form? 

Since $\displaystyle \frac{u+u^2}{1-u^3} = \frac{1}{1-u} - \frac{1}{1-u^3}$,
$$\sum_{n=0}^N \frac {x^{3^n}+(x^{3^n})^2} {1-x^{3^{n+1}}}
= \sum_{n=0}^N \left( \frac{1}{1-x^{3^{n}}} - \frac{1}{1-x^{3^{n+1}}}\right)
=\frac{1}{1-x^{3^0}} - \frac{1}{1-x^{3^{N+1}}}
$$
This implies
$$\sum_{n=0}^{\infty} \frac {x^{3^n}+(x^{3^n})^2} {1-x^{3^{n+1}}} = \frac{1}{1-x} - \lim_{N\to\infty}\frac{1}{1-x^{3^{N+1}}}
= \frac{1}{1-x} - 
\begin{cases}
1, & |x| < 1\\
\frac12 & x = -1\\
\text{undefined}, & x = 1\\
0, & |x| > 1\\
\end{cases}$$
