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?

Hints:
$$(x^0+x^1+x^2+x^3+...x^n)(1-x)=x^0-x^1+x^1-x^2+x^2-x^3+x^3\cdots+x^{n}-x^{n+1}\\
=1-x^{n+1}$$
and
$$(x^0+2x^1+3x^2+4x^3+...(n+1)x^n)(1-2x+x^2)\\
=x^0-2x^1+x^2+2x^1-4x^2+2x^3+3x^2-6x^3+3x^4\cdots\\+(n+1)x^n-2(n+1)x^{n+1}+(n+1)x^{n+2}\\
=1-(n+2)x^{n+1}+(n+1)x^{n+2}.$$
