How do you prove by induction that $\frac{1}{2} + \frac{2}{2^2} + \ldots + \frac{n}{2^n} = 2 - \frac{n+2}{2^n}$? For $n=1$ this is true because $\frac{1}{2^{1}}=2-\frac{1+2}{2^{1}}=\frac{1}{2}$. Further, it is a little more complicated, can we now assume that this is true up to the number $n-1$? Then do the induction step from $n-1$ to $n$.
So what I've tried:
$$\frac{1}{2}+\frac{1}{2^{2}}+\ldots+\frac{n-1}{2^{n-1}}+\frac{n}{2^{n}}=$$
$$=2-\frac{n+1}{2^{n-1}}+\frac{n}{2^{n}}=$$

\begin{align*}
\frac{1}{2} + \frac{1}{2^2} + ... + \frac{n-1}{2^{n-1}}+\frac{n}{2^n}
&=2-\frac{n+1}{2^{n-1}} + \frac{n}{2^n}\\
&= 2+\frac{-2n-2 + n}{2^{n}}\\
&= 2- \frac{n+2}{2^n}
\end{align*}
