Finite Sum $\sum_{i=1}^n\frac i {2^i}$ I'm trying to find the sum of : 
$$\sum_{i=1}^n\frac i {2^i}$$
I've tried to run $i$ from $1$ to $∞$ , and found that the sum is $2$ , i.e : 
$$\sum_{i=1}^\infty\frac i {2^i} =2$$
since :
$$(1/2 + 1/4 + 1/8 + \cdots) + (1/4 + 1/8 + 1/16 +\cdots) + (1/8 + 1/16 + \cdots) +\cdots = 1+ 1/2 + 1/4 + 1/8 + \cdots = 2 $$
But when I run $i$ to $n$ , it's a little bit different , can anyone please explain ? 
Regards

Hint: Consider $f(x) = \sum_{i=0}^n x^i$ as a function of $x$. This is a geometric series, so you can get a simpler expression for this:
$$\sum_{i=0}^n x^i = f(x) = \frac{1 - x^{n+1}}{1 - x}.$$
Now differentiating $f(x)$ with respect to $x$, we get
$$\sum_{i=1}^n i x^{i-1} = f'(x) = \left(\frac{1 - x^{n+1}}{1 - x}\right)' = \ \color{red}{?}$$
Multiplying everything by $x$ we get
$$\sum_{i=1}^n i x^i = x f'(x) = \ \color{red}{?}$$
Now plug in $x = \frac{1}{2}$ to get
$$\sum_{i=1}^n i \left(\frac{1}{2}\right)^i = \frac{1}{2} f'\left(\frac{1}{2}\right) = \ \color{red}{?}$$
