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?
 A: HINT:
Notice that you can factor $(x-1)$ from the numerator. This means that you can divide by $x-1$ and you are left with a straightforward plugging in of numbers. $$\sum_{k=1}^nx^k-n=(x-1)[1+(x+1)+(x^2+x+1)+\cdots+(x^{n-1}+\cdots+x+1)]$$
A: Rewrite the limit as the following:
$$\lim_{x\to1}\frac{x-1}{x-1} + \lim_{x\to1}\frac{x^2-1}{x-1} + ... + \lim_{x\to1}\frac{x^n-1}{x-1}$$
Notice that each limit term has an $x-1$ term in the numerator and denominator. Since in our limit as $x\to1$, $x\neq1$, we can divide through by $x-1$ in every term.
$$\lim_{x\to1}1 + \lim_{x\to1} (x+1) + ... \lim_{x\to1} (x^{n-1} + ...+x+ 1)$$
Since each limit now is of a continuous function with a defined value at $x=1$, we can drop the limits, and substitute $x=1$ to get
$$=\sum\limits_{i=1}^n i = \frac{(n+1)\cdot n}2$$
A: 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*}
A: Hint: 
Write $n$ as $1+1+1\cdots$ with $1$occuring $n$ times and group it with each of the $x,x^2,x^3,\cdots x^n$ term and factor out the $x-1$ term to get the limit.
Method 2: Use L'Hospital rule 
A: As mentioned by user dimitry in his comment:
$P(x)= x^n+x^{n-1}......+x -n;$
$P(x=1)= 0$, hence $(x-1)$ is a factor of $P(x)$.
Polynomial long division yields:
$F(x):=$
$ (x^n +x^{n-1}...+x -n) ÷ (x-1)= $
$x^{n-1} +2x^{n-2} +......(n-1)x + n$;
$\lim_{x \rightarrow 1} F(x)=$
$1+2+...(n-1)+n =$
$ \dfrac{n(n+1)}{2}.$ 
Ref.:https://en.m.wikipedia.org/wiki/Polynomial_long_division
