<s>[INST] Other methods for a limit I know that I can compute the limit
$$
\lim_{x\to1}\frac{Nx^{N+1}-(N+1)x^N+1}{(x-1)^2}=\frac{N(N+1)}{2}
$$
using L'Hospital's rule (not one but two times) but I am looking for other ways. Are there any of them?
p.s.: the limit follows from a shortcut used in order to find the value of $$
\sum_{k=1}^Nkx^k\Big|_{x=1}.
$$
 [/INST] $$Nx^{N+1}-(N+1)x^N+1 = Nx^N(x-1)-(x^N-1)$$
$$ = Nx^N(x-1)-(x-1)(x^{N-1}+...x^2+x+1)$$
$$ = (x-1)\Big(\underbrace{Nx^N-(x^{N-1}+...x^2+x+1)}_{p(x)}\Big)$$
Now $$p(x) = (x^N-x^{N-1})+...+\color{red}{(x^N-x^2)}+\color{blue}{(x^N-x)}+\color{green}{(x^N-1)}$$
$$= x^{N-1}(x-1)+...+\color{red}{ x^2(x^{N-2}-1)}+\color{blue}{ x(x^{N-1}-1)}+\color{green}{(x^N-1)}$$
$$=(x-1)\Big(x^{N-1}+...+\color{red}{ x^2(x^{N-3}+...+x^2+x+1)}+\color{blue}{x(x^{N-2}+...+x^2+x+1)}+\color{green}{(x^{N-1}+...+x^2+x+1)}\Big)$$
So $$...=\lim_{x\to1}\Big(x^{N-1}+...+x^2(x^{N-3}+...+x^2+x+1)+x(x^{N-2}+...+x^2+x+1)+(x^{N-1}+...+x^2+x+1)\Big)$$
$$ 1+2+...+(N-2)+(N-1)+N=...$$
</s>