Why is this logic incorrect? Let $x \in \mathbb{R}$ and  $S = 1 + x + x^{2} + \dots$
Then $xS = x + x^{2} + \dots$
Thus $S - xS = 1 \Rightarrow \frac{1}{1-x}$ 
Clearly this isn't correct. Otherwise we would have $x=-1$ giving two different sums for the series.
Where is the error in the logic? I'm thinking perhaps on the division to arrive at $\frac{1}{1-x}$ but I can't quite see why.
 A: Let consider a finite sum
$$S_n = 1 + x + x^{2} + \dots+ x^{n}$$
$$xS_n = x + x^2 + x^{3} + \dots+ x^{n+1}$$
then
$$S_n-xS_n=1-x^{n+1} \implies S_n = \frac{1-x^{n+1}}{1-x}$$
which is always true for $x\neq 1$ moreover for $|x|<1$ in the limit as $n\to \infty$
$$S_\infty = \frac{1}{1-x}$$
since $x^{n+1}\to 0$.
A: The infinite series $$S = 1 + x + x^{2} + \dots$$ converges for $$-1<x<1$$ which is its interval of convergence. 
That is if you have an $x$ value which is between $-1$ and $1$, then the infinite  series converges to $\frac {1}{1-x}$
On the other hand if you choose an $x$ which is not in the interval of convergence, the series does not converge to a real number so the formal expansion results in seemingly meaningless identities.  
A: If a finite value $S:=1+x+x^2+\cdots$ exists, this argument shows $S=\frac{1}{1-x}$. Whether it exists is the real problem. It doesn't if $|x|\ge1$, because a convergent infinite series has terms that tend to $0$. On the other hand, it does work if $|x|<1$, as can be shown by noting$$\frac{1}{1-x}-(1+x+\cdots+x^{n-1})=\frac{x^n}{1-x},$$which approaches $0$ as $n$ grows.
