Prove by induction that $\frac{1}{2}+\frac{2}{2^2}+\frac{3}{2^3}+\cdots+\frac{n}{2^n}=2-\frac{n+2}{2^n}$ Prove by induction that 
$$
\frac{1}{2}+\frac{2}{2^2}+\frac{3}{2^3}+\cdots+\frac{n}{2^n}=2-\frac{n+2}{2^n}
$$
Let $n=r$, so that
$$
S_r=2-\frac{r+2}{2^r}
$$
Therefore
$$\begin{align}
S_{r+1}=S_r+\frac{r+1}{2^{r+1}}&=2-\frac{r+2}{2^r}+\frac{r+1}{2^{r+1}}\\
&=2-\frac{2^r(r+2)+r+1}{2^{r+1}}\\
&=2-\frac{2^{n-1}(n+1)+n}{2^n}
\end{align}$$
How does $2^{n-1}(n+1)\equiv2$? Or is my method wrong? I've probably made a stupid mistake!

Your mistake seems to be in your second-to-last line.
You clearly wanted to get a common denominator of $2^{r+1}$, but $2^r\cdot2^r=2^{2r}$, not $2^{r+1}$. You should have multiplied numerator and denominator by $2$, not $2^r$. Also, be careful with your signs.
You should get $$S_{r+1}=2+\frac{-2(r+2)}{2^{r+1}}+\frac{r+1}{2^{r+1}}=2+\frac{-r-3}{2^{r+1}}=2-\frac{(r+1)+2}{2^{r+1}}$$
Also, remember that with induction you need to demonstrate that the base case ($n=1$) holds.
