I came across some applications of generating functions, and I'm struggling to "formally justify" why the generating function $G(x)=1+x+x^2+x^3+...$ can be expressed as $\frac{1}{1-x}$.
The way you arrive to that point is this: $x \cdot G(x)=x+x^2+x^3...$, hence $G(x)-x \cdot G(x)=1$. Follows that $G(x)=\frac{1}{1-x}$. Now if $G(x)$ were an actual sum of numbers, that process wouldn't be applicable (a sum of infinite numbers converges to $\frac{1}{1-x}$ only if $|x|<1$). So my question is why is it applicable? What's the meaning of saying that $G(x)-x \cdot G(x)=1$? Why I can't say that $S-x \cdot S=1$, if $S=1+x+x^2...$ and $x$ is a number?
I realise I don't have quite understood in deep these objects, hope someone could help :)
A source might be https://www.youtube.com/watch?v=wqnpSzEzq1w.