Try the method of derivation to sum: 1 + 2x + 3x2 + ~ + nxn-1

Try the method of derivation to sum: 1 + 2x + 3x2 + ~ + nxn-1

When x = 1, 1 + 2x + 3x2 + ~ + nxn-1 = n * (1 + n) / 2
When x ≠ 1
1 + 2x + 3x2 + ~ + nxn-1 = (x + x2 + X3 + + ~ + xn) derivative = x * (1-xn) / (1-x) derivative