Evaluate the limit in $p$ and $q$ Evaluate $$\lim_{x \to 1}\left(\frac{p}{1-x^p}-\frac{q}{1-x^q}\right)$$ where $p,q$ are natural numbers. I have run out of ideas on how do I solve the limit. The few ideas I had did not work.
 A: First, use $1 - x^p = (1 - x)(\sum_{i = 0}^{p-1}x^i)$, as suggested, to get:
$$\lim_{x \rightarrow 1}\left(\frac{p}{(1 - x)(\sum_{i=0}^{p-1}x^i)} - \frac{q}{(1 - x)(\sum_{i = 0}^{q - 1}x^i)}\right)$$
$$=\lim_{x \rightarrow 1}\frac{p\sum_{i = 0}^{q-1}x^i - q\sum_{i = 0}^{p - 1}x^i}{(1 - x)(\sum_{i = 0}^{q-1}x^i)(\sum_{i = 0}^{p - 1}x^i)}$$
$$=\frac{1}{pq}\lim_{x \rightarrow 1}\frac{p\sum_{i = 0}^{q-1}x^i - q\sum_{i = 0}^{p - 1}x^i}{1 - x}$$
Now write $1 - x = u$:
$$=\frac{1}{pq}\lim_{u \rightarrow 0}\frac{p\sum_{i=0}^{q-1}(1-u)^i - q\sum_{i = 0}^{p-1}(1-u)^i}{u}$$
So what we want is to find the coefficient of the $u$ term in the numerator. The coefficient of $u$ in $(1 - u)^i$ is $-i$, and so the answer is:
$$\frac{1}{pq}\left(p\sum_{i = 0}^{q - 1}(-i) - q\sum_{i = 0}^{p - 1}(-i)\right)$$
$$=\frac{1}{pq}\left(-p\frac{(q-1)q}{2} + q\frac{(p-1)p}{2}\right) = \frac{p-1}{2} - \frac{q-1}{2} = \frac{p - q}{2}$$
A: $$\begin{align*}
\lim_{x\to 1}\frac{p}{1-x^p}-\frac{q}{1-x^q}&=\lim_{x\to 1}\frac{p(1-x^q)-q(1-x^p)}{(1-x^p)(1-x^q)}\\
&=\lim_{x\to 1}\frac{p-q-px^q+qx^p}{1-x^p-x^q+x^{p+q}}\\
&=\lim_{x\to 1}\frac{-pqx^{q-1}+qpx^{p-1}}{-px^{p-1}-qx^{q-1}+(p+q)x^{p+q-1}}\\
&=\lim_{x\to 1}\frac{-pq(q-1)x^{q-2}+qp(p-1)x^{p-2}}{-p(p-1)x^{p-2}-q(q-1)x^{q-2}+(p+q)(p+q-1)x^{p+q-2}}\\
&=\frac{-pq(q-1)+qp(p-1)}{-p(p-1)-q(q-1)+(p+q)(p+q-1)}\\
&=\frac{-pq^2+pq+qp^2-qp}{-p^2+p-q^2+q+p^2+pq-p+qp+q^2-q}\\
&=\frac{qp^2-pq^2}{pq+qp}\\
&=\frac{qp(p-q)}{2pq}\\
&=\frac{(p-q)}{2}\\
\end{align*}
$$
The third and fourth equalities are from application of L'Hosptial's rule. The fifth equality is the application of the limit as it is finally not an indeterminate form.
A: If you consider Laurent series built at $x=1$, you have $$\frac{1}{1-x^n}=-\frac{1}{n (x-1)}+\frac{n-1}{2 n}+\left(\frac{1}{12 n}-\frac{n}{12}\right)
   (x-1)+O\left((x-1)^2\right)$$ So $$\frac{p}{1-x^p}-\frac{q}{1-x^q}=\Big(-\frac{1}{x-1}+\frac{p-1}{2}+\left(\frac{1}{12}-\frac{p^2}{12}\right)
   (x-1)+O\left((x-1)^2\right) \Big)-\Big(-\frac{1}{x-1}+\frac{q-1}{2}+\left(\frac{1}{12}-\frac{q^2}{12}\right)
   (x-1)+O\left((x-1)^2\right)\Big)$$ that is to say $$\frac{p}{1-x^p}-\frac{q}{1-x^q}=\frac{p-q}{2}+\frac{q^2-p^2}{12} (x-1) +O\left((x-1)^2\right)$$ which gives not only the limit but also how it is approached.
A: Use the factorization $1-x^p=(1-x)\sum_{i=0}^{p-1}x^i$ to rewrite this:
\begin{align*}
\lim_{x\to1}\left(\dfrac{p}{1-x^p}-\dfrac{q}{1-x^q}\right)
&=\lim_{x\to1}\left(\dfrac{p}{(1-x)\sum_{i=0}^{p-1}x^i}-\dfrac{q}{(1-x)\sum_{i=0}^{q-1}x^i}\right) \\
&=\lim_{x\to1}\dfrac{\dfrac{p}{\sum_{i=0}^{p-1} x^i} - \dfrac{q}{\sum_{i=0}^{q-1}x^i}}{1-x}\\
%&= \lim_{x\to1}\frac{-\dfrac{p\sum_{i=0}^{p-1} ix^i}{\left(\sum_{i=0}^{p-1} x^i\right)^2}+\dfrac{q\sum_{i=0}^{q-1} ix^i}{\left(\sum_{i=0}^{q-1} x^i\right)^2}}{-1}\\
%&= \dfrac{p\sum_{i=0}^{p-1}i}{p^2}-\dfrac{q\sum_{i=0}^{q-1} i}{q^2}\\
%&= \frac{p-1}2-\frac{q-1}2 = \frac{p-q}2
\end{align*}
Now apply L'Hospital's rule.
