How to solve this with mathematical induction? $$\sum_{i=0}^n \frac{i}{2^i} = 2 - \frac{n+2}{2^n} $$
Let's skip the check, since when n = 1, I have $\frac{1}{2} = \frac{1}{2}$ 
What i will next do ? What for expression i may receive ?
$$\sum_{i=0}^{n+1}\frac{i}{2^i} = 2 - \frac{n+2}{2^n} $$
My trying : 
$$ \biggl(\sum_{i=0}^{n+1}\frac{i}{2^i} = 2 - \frac{n+2}{2^n}\biggl) = \frac{n+1}{2^{n+1}}  $$
or 
$$ \biggl(\sum_{i=0}^{n+1}\frac{i}{2^i} = 2 - \frac{n+2}{2^n}\biggl) = \frac{2^{n+2}-(n+1)+2}{2^{n+1}} $$
Which answer should I use? And how will I decide next?
 A: For the inductive step you have to show, that $\sum_{i=0}^{n+1} \frac{i}{2^i}=2-\frac{(n+1)+2}{2^{n+1}}$.
We have to use the inductive claim and go like this:
$\begin{align}\sum_{i=0}^{n+1} \frac{i}{2^i}\\&=\color{red}{\sum_{i=0}^{n} \frac{i}{2^i}}+\frac{n+1}{2^{n+1}}\\&=\color{red}{2-\frac{n+2}{2^n}}+\frac{n+1}{2^{n+1}}\\&=2+\frac{-2(n+2)+n+1}{2^{n+1}}\\&=2+\frac{-2n-4+n+1}{2^{n+1}}\\&=2+\frac{-n-3}{2^{n+1}}\\&=2-\frac{n+3}{2^{n+1}}\end{align}$
A: I'm not sure what you're trying to do with brackets, but you shouldn't equate a number to a bracketed equation, which is a statement. The correct write-up is $$\sum_{i=0}^{n+1}\frac{i}{2^i}=2-\frac{n+2}{2^n}+\frac{n+1}{2^{n+1}}=2-\frac{n+3}{2^{n+1}}.$$(For what it's worth, these sums could start at $i=1$ instead, since $\frac{0}{2^0}=0$.)
A: You should prove that$$\sum_{i=0}^n\frac i{2^i}=2-\frac{n+2}{2^n}\implies\sum_{i=0}^{n+1}\frac i{2^i}=2-\frac{n+3}{2^{n+1}}.$$In order to do that, you do:\begin{align}\sum_{i=0}^{n+1}\frac i{2^i}&=\left(\sum_{i=0}^n\frac i{2^i}\right)+\frac{n+1}{2^{n+1}}\\&=2-\frac{n+2}{2^n}+\frac{n+1}{2^{n+1}}\\&=2-\frac{2n+4}{2^{n+1}}+\frac{n+1}{2^{n+1}}\\&=2-\frac{n+3}{2^{n+1}}.\end{align}
