I'm having troubles solving the fourth item of this problem set. It's from an algebra class. I've managed to solve the previous three, but I can't seem to figure out how to tackle the last one.
$$\text{i})\sum^n_{i=1}q^i \qquad \qquad \quad \text{ii})\sum^n_{i=0}q^{2i} \qquad \qquad \quad \text{iii})\sum^{2n}_{i=n}q^i \qquad \qquad \quad\text{iv})\sum^n_{i=0}(n-i)q^{i}$$
More precisely I don't know how to solve the following sum: $$\sum _{i=0}^n {i q^i}$$
Thanks for your hints and suggestions!