S=1+2x+3x^2+...+nx^(n-1)
两端同时乘 x
xS = x + 2x^2 + 3x^3 + …… + (n-1)x^(n-1) + n*x^n
两式做差
(1-x)S = [1 + x + x^2 + …… + x^(n-1)] - n*x^n
= (1-x^n)/(1-x) - n*x^n
S = (1-x^n)/(1-x)^2 - n*x^n/(1-x)
如果需要,那么可以继续通分整理.
S = [(1 - x^n) - n*x^n(1-x)]/(1-x)^2
= [1 - x^n - n*x^n + n*x^(n+1)]/(1-x)^2
= [1 - (n+1)x^n + n x^(n+1)]/(1-x)^2