<s>[INST] A problem related with limit and continuity. 
What is the limit as $x$ tends to $1$ in the function $$\frac{x+x^2+x^3+\cdots+x^n-n}{x-1}\quad?$$

I tried factoring out the $x$ term then again rewriting the factored term. But nothing came out at all. Could anyone help me out?
 [/INST] Define 
$$f(x)=x+x^2+x^3+\cdots+x^n.$$
Then $$f'(x)=1+2x+3x^2+\cdots+nx^{n-1}.$$
It follows that
\begin{align*}
\lim_{x \to 1}\frac{x+x^2+x^3+\cdots+x^n-n}{x-1}&=\lim_{x \to 1}\frac{f(x)-f(1)}{x-1}=f'(1)\\&=1+2+3+\cdots+n\\&=\frac{n(n+1)}{2}.\end{align*}
</s>