Calculating $\lim_{x \rightarrow 1}(\frac{23}{1-x^{23}} - \frac{31}{1-x^{31}})$ How to calculate following limit?
$$\lim_{x \rightarrow 1}\left(\frac{23}{1-x^{23}} - \frac{31}{1-x^{31}}\right)$$
 A: Let $x=1+y$, then
$$
\begin{align}
\frac{23}{1-x^{23}}-\frac{31}{1-x^{31}}
&=\frac{23}{1-(1+23y+\frac{23\cdot22}{2\cdot1}y^2+O(y^3))}\\
&-\frac{31}{1-(1+31y+\frac{31\cdot30}{2\cdot1}y^2+O(y^3))}\\
&=-\frac1y(1-\tfrac{22}{2\cdot1}y+O(y^2))\\
&\hphantom{=}+\frac1y(1-\tfrac{30}{2\cdot1}y+O(y^2))\\
&=(\tfrac{22}{2\cdot1}-\tfrac{30}{2\cdot1})+O(y)\\
&=-4+O(y)
\end{align}
$$
Therefore,
$$
\lim_{x\to1}\frac{23}{1-x^{23}}-\frac{31}{1-x^{31}}=-4
$$
A: Afer all, l'Hospital is not a bad alternative here. And it is certainly better than my previous answer...
$$
\frac{23}{1-x^{23}}-\frac{31}{1-x^{31}}=\frac{-8+31x^{23}-23x^{31}}{(x^{23}-1)(x^{31}-1)}=\frac{p(x)}{q(x)}
$$
We have
$$\lim_1 \;p=\lim_1 \;q=0.$$ 
Now $p'(x)=713(x^{22}-x^{30})$ and $p''(x)=713(22x^{21}-30x^{29})$ yield $$\lim_1\;p'=0\quad\mbox{and}\quad\lim_1 \;p''=-8\cdot 713.
$$
For $q$, we can write $q(x)=(x-1)^2r(x)$ with $r$ polynomial such that $r(1)=23\cdot 31=713$. It suffices to use $(x^n-1)=(x-1)(x^{n-1}+\ldots+1)$. Now $q'(x)=2(x-1)r(x)+(x-1)^2r'(x)$ and $q''(x)=2r(x)+(x-1)s(x)$ for some polynomial $s$. Hence
$$\lim_1\;q'=0\quad\mbox{and}\quad\lim_1 \;q''=2\cdot 713.
$$
So a two step application of l'Hospital yields
$$
\lim_1 \frac{p}{q}=\lim_1 \frac{p'}{q'}=\lim_1 \frac{p''}{q''}=\frac{-8\cdot 713}{2\cdot 713}=-4.
$$
A: Generalized form
$$\lim_{x \rightarrow 1}\left(\frac{m}{1-x^{m}} - \frac{n}{1-x^{n}}\right) = \frac{n-m}{2}$$ 
$Proof:$
$Let$ $L =   \lim_{x \rightarrow 1}\left(\frac{m}{1-x^{m}} - \frac{n}{1-x^{n}}\right)$
$Let x = \frac{1}{y}$
$if x\rightarrow 1$     $then$ $y\rightarrow 1$
$L =\lim_{x \rightarrow 1}\left(\frac{m}{1-\frac{1}{y^{m}}} - \frac{n}{1-\frac{1}{y^{n}}}\right) $
$L =\lim_{x \rightarrow 1}\left(\frac{my^{m}}{y^{m}-1} - \frac{ny^{n}}{y^{n}-1}\right)$
$L =\lim_{x \rightarrow 1}\left(\frac{my^{m}-m+m}{y^{m}-1} - \frac{ny^{n}-n+n}{y^{n}-1}\right)$
$L =\lim_{x \rightarrow 1}\left(\frac{(-m)(1-y^{m})+m}{y^{m}-1} - \frac{(-n)(1-y^{n})+n}{1-y^{n}}\right)$
$L =\lim_{x \rightarrow 1}\left((-m)+\frac{m}{y^{m}-1} - (-n)-\frac{n}{y^{n}-1}\right)$
$L =\lim_{x \rightarrow 1}\left((n-m)+\frac{m}{y^{m}-1} - \frac{n}{y^{n}-1}\right)$
$L =\lim_{x \rightarrow 1}(n-m)+\lim_{x \rightarrow 1}\left(-\frac{m}{1-y^{m}} + \frac{n}{1-y^{n}}\right)$
$L =(n-m)-\lim_{x \rightarrow 1}\left(\frac{m}{1-y^{m}} - \frac{n}{1-y^{n}}\right)$
$L =(n-m)-L$
$2L =(n-m)$
$L =\frac{(n-m)}{2}$
For above question m = 31,  n =  23
hence $L= \frac{(23-31)}{2} = (-4)$  
A: Alternatively, applying L'Hopital's rule, we get:
\begin{align}
\lim_{x \to 1}{\frac{23}{1-x^{23}}-\frac{31}{1-x^{31}}}& =\lim_{x \to 1}{\frac{23(x^{23}+x^{24}+ \ldots +x^{30})-8(1+x+\ldots +x^{22})}{(1-x^{31})(1+x+ \ldots +x^{22})}} \\
& =\lim_{x \to 1}{\frac{23(23x^{22}+24x^{23}+ \ldots +30x^{29})-8(1+ 2x+\ldots +22x^{21})}{-31x^{30}(1+x+ \ldots +x^{22})+(1-x^{31})(1+2x+\ldots+22x^{21})}} \\
& =\frac{23(22(8)+\frac{8(9)}{2})-8(\frac{22(23)}{2})}{-31(23)} \\
& =-4
\end{align}
