Let $\displaystyle S = 1 + 2x + 3x^{2} + ... + nx^{n-1} $. By considering S - xS, show that

$\displaystyle S = \frac{1 - x^{n}}{(1-x)^{2}} - \frac{nx^{n}}{1-x}$.

Hence find the sum of the first n terms of the series:

1) $\displaystyle \frac{1}{2} + \frac{2}{4} + \frac {3}{8} + \frac{4}{16} + ...$,

2) 1 + 11 + 111 + 1111 + ...

I can prove that $\displaystyle S = \frac{1 - x^{n}}{(1-x)^{2}} - \frac{nx^{n}}{1-x}$ but I am not sure how to use the result to work out the sum of the following series. Thanks for any help