# Simplifying sum to x/(1-3x)

In WolframAlpha, I see the following: $$x \sum_{n=0}^\infty 3^n x^n = \frac{x}{1-3x}$$

How is the RHS determined? I do not understand how that was simplified. Thank you!

First,

$$x\sum_{n\ge 0}3^nx^n=x\sum_{n\ge 0}(3x)^n\;.$$

so we have $x$ times a geometric series with ratio $3x$. This series has sum

$$\sum_{n\ge 0}(3x)^n=\frac1{1-3x}\;,$$

so

$$x\sum_{n\ge 0}3^nx^n=x\cdot\frac1{1-3x}=\frac{x}{1-3x}\;.$$

Geometric series with first term $1$ and common ratio $3x$, valid for $|x| < \frac{1}{3}$. By the infinite sum formula for geometric series,

$$\sum_{n=0}^\infty r^n = \frac{1}{1-r}$$

for $|r| < 1$. Setting $r = 3x$ gives you the result.