Solve this limit $\lim\limits_{x\to 1}\left(\dfrac{2017}{1-x^{2017}} -\dfrac{2018}{1-x^{2018}}\right)$ \begin{align}
\lim\limits_{x\to 1}\left(\dfrac{2017}{1-x^{2017}} -\dfrac{2018}{1-x^{2018}}\right)
&= \lim\limits_{x\to 1}\dfrac{2017(x^{2017} + \dots + 1) - 2018(x^{2016} + \dots + 1)}{(1-x)(x^{2016} + \dots +1)(x^{2017} + \dots +1)}\\\\
&= \lim\limits_{x\to 1}\dfrac{2017x^{2017} - x^{2016} - \dots - 1}{(1-x)(x^{2016} + \dots +1)(x^{2017} + \dots +1)}
\end{align}
Did I do the right way with those step above?
I think next step is to separate:
$2017x^{2017} = \underbrace{x^{2017} + \dots + x^{2017}}_{\text{2017 addends}}$
Then combine with the rest and factorize $(1-x)$,
but it has a little confused after factorizing.
Please help me!!?
 A: You're on the right track. You can continue by dividing out the problematic factor $1-x$. What does long division of the numerator by $1-x$ give?
Hint:

 If $P(x)=(x-1)Q(x)$ then $P'(x)=Q(x)+(x-1)Q'(x)$, so $Q(1)=P'(1)$.

Details:

 Denote the polynomial in the numerator of the fraction by $P(x)$, so that$$P(x)=2017x^{2017}-x^{2016}-\ldots-x-1.$$By polynomial longdivision there exist polynomials $Q(x)$ and $R(x)$ with integer coefficients such that $P(x)=(x-1)Q(x)+R(x)$, where $\deg R(x)<\deg(x-1)$. That is to say $R(x)$ is constant, so $R(x)=R$ for some integer $R$. Plugging in $x=1$ shows that $$P(1)=(1-1)Q(1)+R(1)=R(1)=R,$$and it is not hard to see that $P(1)=0$. This means $P(x)=(x-1)Q(x)$ and so$$\lim\limits_{x\to 1}\dfrac{P(x)}{(1-x)(x^{2016} + \dots +1)(x^{2017} + \dots +1)}=\lim\limits_{x\to 1}\dfrac{Q(x)}{(x^{2016} + \dots +1)(x^{2017} + \dots +1)}.$$Here the hint comes in handy; we have\begin{eqnarray*}Q(1)&=&P'(1)=2017^2-2016-\ldots-2-1\\&=&2017^2-\frac12\cdot2017\cdot2016=2017\cdot1009.\end{eqnarray*}It follows that$$\lim\limits_{x\to 1}\dfrac{-Q(x)}{(x^{2016} + \dots +1)(x^{2017} + \dots +1)}=\frac{-2017\cdot1009}{2017\cdot2018}=-\frac12.$$

A: Yes, your approach is correct and you are doing fine. Now note that
\begin{align*}
2017x^{2017} - x^{2016} - \dots - 1&=2017(1+t)^{2017}-\frac{(1+t)^{2017}-1}{t}\\
&=2017(1+2017t+o(t))-\frac{1+2017t+\binom{2017}{2}t^2+o(t^2)-1}{t}\\
&=\left(2017^2-\frac{2017\cdot 2016}{2}\right)t+o(t)=(2017\cdot 1009)t+o(t)
\end{align*}
where $t=x-1\to 0$.
Hence, according to your work
$$\lim_{x\to 1}\left(\dfrac{2017}{1-x^{2017}} -\dfrac{2018}{1-x^{2018}}\right)
= \lim_{t\to 0}\dfrac{(2017\cdot 1009)t+o(t)}{-t(2017+o(1))(2018+o(1))}=-\frac{1}{2}.$$
Bonus exercise. More generally, show that for $n,m\in\mathbb{N}^+$,
$$\lim\limits_{x\to 1}\left(\dfrac{n}{1-x^{n}} -\dfrac{m}{1-x^{m}}\right)=\frac{n-m}{2}.$$
A: Just a small note to add that your approach of factoring $2017x^{2017}-x^{2016}-\ldots-x-1$ by breaking up the leading term and then splitting the rest is a clever one that also works here; a little careful examination and some summation notation will show what's going on. What you're left with is $(x^{2017}-x^{2016})+(x^{2017}-x^{2015})+\ldots+(x^{2017}-1)$ $= \sum_{i=0}^{2016}(x^{2017}-x^i)$. Now, we can take $j=2017-i$ and write the sum in terms of $j$: $\sum_{j=1}^{2017} (x^{2017}-x^{2017-j})$ $=\sum_{j=1}^{2017}x^{2017-j}(x^j-1)$ Factoring $x-1$ out of this is pretty straightforward; we get $(x-1)\sum_{j=1}^{2017}x^{2017-j}\left(\sum_{k=0}^{j-1}x^k\right)$. Now the polynomial multiplying $x-1$ can be summed explicitly easily enough through a bit more index juggling, but it's even easier to just plug in $x=1$ and evaluate, getting $\sum_{j=1}^{2017}\left(\sum_{k=0}^{j-1}1\right)$ $=\sum_{j=1}^{2017}j$ $=\frac{2017\cdot 2018}{2}$.
A: The binomial theorem gives another way. Let $x=1+\varepsilon$ with $0<|\varepsilon|\ll1$. Then
$$x^n=1+n\varepsilon+\tfrac12n(n-1)\varepsilon^2+O(\varepsilon^3),\quad x^{n+1}=1+(n+1)\varepsilon+\tfrac12(n+1)n\varepsilon^2+O(\varepsilon^3).$$Hence
$$\frac n{1-x^n}-\frac{n+1}{1-x^{n+1}}=\frac1\varepsilon\left(\frac{-1}{1+\tfrac12(n-1)\varepsilon+O(\varepsilon^2)}-\frac{-1}{1+\tfrac12n\varepsilon+O(\varepsilon^2)}\right)$$
$$=-\frac1\varepsilon\frac{\tfrac12\varepsilon+O(\varepsilon^2)}{1+n\varepsilon+O(\varepsilon^2)}=-\frac{\tfrac12+O(\varepsilon)}{1+O(\varepsilon)}.$$
Therefore the limit as $\varepsilon\to0$ is $-\frac12$.
