Formalizing an approach to the sum $\sum_{k=0}^{\infty}ka^k$ 
Let a be $a$ be a real number such that $0<a<1$
  find
  $\begin{align}
\sum_{k=0}^{\infty}ka^k
\end{align}$

I know that
$a^0+a^1+...+a^\infty = \frac{1}{1-a}$
By stretching it as follows
$\begin{align}
\sum_{k=0}^{\infty}ka^k= \\a^1+a^2+a^3...+a^\infty \\+a^2+a^3+a^4...+a^\infty
 \\+a^3+a^4+a^5...+a^\infty
\\ .\\.\\.\\+a^\infty \\= \sum_{k=1}^{\infty}\frac{a^k}{1-a}
\\ = \frac{a}{(1-a)^2}\end{align}$
Writing it a little better, 
$\begin{align}
\sum_{k=0}^{\infty}ka^k=
\end{align}$
$\begin{gather}
a^1\rightarrow a^\infty+\\a^2\rightarrow a^\infty+\\ \downarrow \\a^\infty \end{gather}\\$$\begin{align}=\sum_{k=1}^\infty\frac{a^k}{1-a}= \frac{a}{(1-a)^2}\end{align}$
How to formalize this stuff?
 A: I'd get rid of the part after "writing it a little better" because the monster between the first and second $=$-sign is hideous and hard to read. Using more words also helps if you're going for more intuitive proofs. If you really want to deliver a waterproof, rigorous mathematical proof, I'd try to avoid the $\cdots$-notations (and since you're not using words that much I feel like that is what you were going for). In the more rigorous proofs, when I try to prove $A=B$, I always like to just start by writing $A=$, and use simple aritmetic to finally end up with $B$. Sometimes you need (or want) to use some lemma's, as I do below with $\sum a^k=\frac1{1-a}$, but usually you can either mention them before you start or simply assume the reader is aware of that fact (as I do below). So, here's my take on it:

\begin{align}
\sum_{k=0}^{\infty}ka^k&=\\
\sum_{k=1}^{\infty}ka^k&=\\
\sum_{k=1}^{\infty}\left(\sum_{i=1}^k1\right)a^k&=\\
\sum_{k=1}^{\infty}\sum_{i=1}^ka^k&=\\
\sum_{i=1}^\infty\sum_{k=i}^{\infty}a^k&=\\
\sum_{i=1}^\infty a^i\sum_{k=i}^{\infty}a^{k-i}&=\\
\sum_{i=1}^\infty a^i\left(\sum_{k=0}^{\infty}a^k\right)&=\\
\sum_{i=1}^\infty a^i\cdot\frac{1}{1-a}&=\\
\frac{1}{1-a}\sum_{i=1}^\infty a\cdot a^{i-1}&=\\
\frac{a}{1-a}\sum_{i=0}^\infty a^i&=\\
\frac{a}{1-a}\cdot \frac{1}{1-a}&=\\
\frac{a}{(1-a)^2}&\\
\end{align}
A: First of all, there is no last term, $a^{\infty}$. The proper way to write these sums would be $a_1+a_2+\cdots$.

Your argument is basically this: we have an infinite triangle of numbers that looks like
$$
\begin{array}{ccccc}
a^1 & a^2 & a^3 & \dots\\
 & a^2 & a^3 & \dots\\
 &  & a^3 & \dots\\
 &  &  & \ddots\\
\end{array}
$$
The given sum, $\sum ka^k$, is what happens when you add up all the columns, then add up all of those sums. What you have done is instead first add up the rows, then add up all of those sums. The fact that both summation methods agree is obvious for a finite array of numbers, but requires justification for infinite ones. It turns out that is always OK to do when all the terms are nonnegative, which they are in your case. This is known as Tonelli's theorem.

Here is another method, which is different and less intuitive than your method, but is easier to justify. By definition, $\sum_{k=1}^\infty ka^k=\lim_{n\to\infty} \sum_{k=1}^n ka^k$. We can compute all of these finite sums exactly using your trick:
$$
\begin{align}
\sum_{k=1}^n ka^k
&=(a^1+\dots+a^n)+(a^2+\dots+a^n)+\dots+(a^n)\\
&=\frac{a^1-a^{n+1}}{1-a}+\frac{a^2-a^{n+1}}{1-a}+\dots+\frac{a^n-a^{n+1}}{1-a}\\
&=\frac{a+\dots+a^n-na^{n+1}}{1-a}\\
&=\frac{\frac{a-a^{n+1}}{1-a}-na^{n+1}}{1-a}\end{align}$$ 
Letting $n\to\infty$, the $a^{n+1}$ and $ na^{n+1}$ both disappear, leaving the answer you expected.
A: Another standard technique for finding sums of the form $\sum\limits_k k^na^k$: You can view your sum as a special case of the power series
$$f(x)=\sum_{k\ge0}kx^k=\sum_{k\ge1}kx^k$$
with $x=a$. It's well known that if $|x|<1$, then
$$g(x):=\sum_{k\ge0}x^k=\frac1{1-x}$$
Upon differentiating both sides (we can pass the derivative operator into the sum because it's linear; the derivative of a sum is the sum of derivatives) with respect to $x$, we have
$$\begin{array}{ll}
\displaystyle\frac{\mathrm dg(x)}{\mathrm dx}&=\displaystyle\frac{\mathrm d\frac1{1-x}}{\mathrm dx}\\[1ex]
\displaystyle\frac{\mathrm d}{\mathrm dx}\sum_{k\ge0}x^k=\sum_{k\ge0}\frac{\mathrm dx^k}{\mathrm dx}=\sum_{k\ge0}kx^{k-1}&=\displaystyle\frac1{(1-x)^2}
\end{array}$$
On the left hand side, we find
$$\sum_{k\ge0}kx^{k-1}=\frac1x\sum_{k\ge0}kx^k=\frac{f(x)}x=\frac1{(1-x)^2}\implies f(x)=\frac x{(1-x)^2}$$
from which we conclude that
$$f(a)=\sum_{k\ge0}ka^k=\frac a{(1-a)^2}$$
