<s>[INST] Calculating the sum of $f(x) = \sum_{n=0}^{\infty} {n \cdot 2^n \cdot x^n}$ In Calculus, how do I calculate this sum?
$$f(x) = \sum_{n=0}^{\infty} {n \cdot 2^n \cdot x^n}$$
This is what I did so far:
$$ f(x) = 2x \cdot \sum_{n=0}^{\infty} {n \cdot 2^n \cdot x^{n-1}} $$
Therefore:
$$ \frac{\int{f(x)}}{2x} = \sum_{n=0}^{\infty} {2^n \cdot x^n}$$
But I have no idea where to continue from here!
 [/INST] Here is a more elementary proof, which doesn't use the differentiability/integrability property of power series:
Let 
$$S_m= \sum_{n=0}^{m} {n \cdot 2^n \cdot x^n}$$
Then 
$$2x S_m =\sum_{n=0}^{m} {n \cdot 2^{n+1} \cdot x^{n+1}}=\sum_{k=1}^{m+1} {(k-1) \cdot 2^{k} \cdot x^{k}}$$
$$=\left(\sum_{k=1}^{m+1} k \cdot 2^{k} \cdot x^{k}\right)-\left(\sum_{k=1}^{m+1}   2^{k} \cdot x^{k}\right)=\left(\sum_{k=0}^{m+1} k \cdot 2^{k} \cdot x^{k}\right)-\left(2x\cdot\frac{1-(2x)^{m+1}}{1-2x}\right)$$
$$2xS_m=\left(S_m+(m+1)2^{m+1}x^{m+1}\right)-\left(2x\cdot\frac{1-(2x)^{m+1}}{1-2x}\right)$$
Solving for $S_m$ yields:
$$S_m=\left(2x\cdot\frac{1-(2x)^{m+1}}{(1-2x)^2}\right)-\frac{(m+1)(2x)^{m+1}}{1-2x}$$
now, $S_m$ is convergent if and only if $(2x)^{m+1} \to 0$ if and only if $|2x|<1$.
In this case
$$\lim S_m= 2x\cdot\frac{1}{(1-2x)^2}$$
</s>