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?

Let $S=1+x+x^2+\dotsb$. Now, take a look at this:
$\phantom xS=1+x+x^2+x^3+\dotsb$
$xS=\phantom{1+{}}x+x^2+x^3+\dotsb$
Thus, we have:
\begin{align}
S&=1+xS\\
S-Sx&=1\\
S(1-x)&=1\\
S&=\frac1{1-x}
\end{align}

Moving on to the second one: This one is a bit trickier, but we'll use the identity $(n+2)-2(n+1)+n=0$ in a clever way.
Let $T=x+2x^2+3x^3+\dotsb$. Now:
$\phantom{(1-2x+x^2)}T=x+2x^2+3x^3+4x^4+5x^5+\dotsb$
$\phantom{(1+x^2)}-2xT=\phantom{x}-2x^2-4x^3-6x^4-8x^4-\dotsb$
$\phantom{(1-2x+{})}x^2T=\phantom{x+2x^2+3}x^3+2x^4+3x^5+\dotsb$
Add them up:
$(1-2x+x^2)T=x$
Thus, we have:
$$T=\frac x{1-2x+x^2}=\frac x{(1-x)^2}$$

EDIT: By the way, we haven't been paying much attention to the matter of convergence. All we've proven, in fact, is that where $S$ and $T$ converge, their sums are equal to what we've derived above.
We've actually implicitly assumed that $\displaystyle\lim_{N\to\infty}x^N=0$, which is only true where $-1<x<1$. This happens to be where $S$ and $T$ converge. (We should check the boundary points — that is, $x=1$ and $x=-1$ — but it's not too hard to see that the sums diverge there.)
