Expansion of $S=\frac{{nx^{n+1}-(n+1)x^{n}+1}}{(x-1)^2}$ Expand;
$S=\frac{{nx^{n+1}-(n+1)x^{n}+1}}{(x-1)^2}$
See solution, Also I am looking for an advance method if exists.

Solution:
$S=\frac{{nx^{n+1}-(n+1)x^{n}+1}}{(x-1)^2}=\frac{{(n+1)x^{n+1}-(n+1)x^{n}+1}-x-x^{n+1}+x}{(x-1)^2}=\frac{(x-1)[(n+1)x^n -1]-(x^{n+1}-x)}{(x-1)^2}=(\frac{x^{n+1}-x}{x-1})^{'}=(x+x^2+x^3+ . . .x^n)^{'}=1+2x+3x^2+4x^3+ . . .nx^{n-1}$
