Partial sums of $nx^n$ WolframAlpha claims:
$$\sum_{n=0}^m n x^n = \frac{(m x - m - 1) x^{m + 1} + x}{(1 - x)^2} \tag{1}$$
I know that one can differentiate the geometric series to compute $(1)$ when it is a series, i.e. $m=\infty$. However, I'm wondering how the closed form for the partial sum is obtained. Actually, WolframAlpha gives an explicit formula for
$$\sum_{n=0}^m n(n-1)(n-2)\cdots (n-k)x^n \tag{2}$$
where $k$ is an integer between $0$ and $n-1$, so it seems that there are some differentiation involved. But already for $k=5$, the formula becomes very messy. 
My question: How to prove $(1)$ and how to build a similar formula for $(2)$ assuming $k$ is given?
 A: If one knows the geometric series, then
$$\sum_{n=0}^mx^n=\frac{1-x^{m+1}}{1-x}$$
And by differentiating $k$ times,
$$\sum_{n=0}^mn(n-1)(n-2)\dots(n-k+1)x^{n-k}=\frac{d^k}{dx^k}\frac{1-x^{m+1}}{1-x}$$
Multiply both sides by $x^k$ to then get your sum.  By using Leibniz's rule,
$$\frac{d^k}{dx^k}\frac{1-x^{m+1}}{1-x}=\frac{k!(1-x^{m+1})}{(1-x)^{k+1}}-\sum_{n=1}^k\binom{m+1}nk!(k+1-n)\frac{x^{m+1-k}}{(1-x)^{k+1-n}}$$

One may evaluate this using the Gamma function.
$$\begin{align}\sum_{n=0}^mn(n-1)(n-2)\dots(n-k)x^n&=\sum_{n=0}^m\frac{n!}{(n-k-1)!}x^n\\&=\frac1{(n-k-1)!}\sum_{n=0}^m\int_0^\infty t^ne^{-t}\ dt\ x^n\\&=\frac1{(n-k-1)!}\int_0^\infty e^{-t}\sum_{n=0}^m(tx)^n\ dt\\&=\frac1{(n-k-1)!}\int_0^\infty\frac{e^{-t}(1-(tx)^{m+1})}{1-tx}\ dt\\&=\frac1{x(n-k-1)!}\int_0^\infty\frac{e^{-t}(1-t^{m+1})}{1-t}\ dt\end{align}$$
whereupon for any given $m\in\mathbb N$, you can evaluate this integral to obtain a closed form.
A: use that $$\sum_{i=1}^{n}x^i=\frac{x \left(x^n-1\right)}{x-1}$$ and differentiate with respect to $x$
