Proof of sum results I was going through some of my notes when I found both these sums with their results
$$
x^0+x^1+x^2+x^3+... = \frac{1}{1-x}, |x|<1
$$
$$
0+1+2x+3x^2+4x^3+... = \frac{1}{(1-x)^2}
$$
I tried but I was unable to prove or confirm that these results are actually correct, could anyone please help me confirm whether these work or not?

Others have answered on how to justify that $S=1+x+x^2+\cdots+x^n+\cdots$ equals $\frac{1}{1-x}$ for $|x|<1$. To get the second identity without differentiation, note that
\begin{align*}
1+2x+3x^2+4x^3+\cdots&=1+(x+x)+(x^2+x^2+x^2)+(x^3+x^3+x^3+x^3)+\cdots\\
&=(1+x+x^2+x^3+\cdots)+(x+x^2+x^3+\cdots)+(x^2+x^3+\cdots)+\cdots\\
&=S+xS+x^2S+\cdots=S(1+x+x^2+\cdots)\\
&=S^2\\
&=\frac{1}{(1-x)^2}\cdot
\end{align*}
