# How does one go about $\lim_{y\to x} \frac{x^n-y^n}{x-y}$?

$$\lim_{y\to x} \frac{x^n-y^n}{x-y}$$

I think it would not be differentiable because if we used L'Hôpital the denominator would become $0$.

I would like to learn which approach would be better and why: the long-division or by differentiation?

• L'Hospital is completely missing the point. This is the definition of the derivative of $x^n$ at $y$.
– user296602
Commented Nov 2, 2017 at 17:03
• @user296602 Apart from being written like that instead of the more standard $\displaystyle\lim_{y\to x}\frac{y^n-x^n}{y-x}$ Commented Nov 2, 2017 at 18:30
• @user296602: L’Hospital is hardly missing the point! Sure, this limit is the definition of the derivative. But L’Hospital still also solves it very straightforwardly, as @Etoplay’s answer below shows. The great thing about tools like L’Hospital is that they’re so powerful and general; it’s perfectly sensible to try your standard toolbox on every you limit they meet, before slowing down to think more open-endedly about finding a new argument for the individual special case. Commented Nov 2, 2017 at 19:23

$$\lim _{ y\to x } \frac { x^{ n }-y^{ n } }{ x-y } =\lim _{ y\to x } \frac { \left( x-y \right) \left( { x }^{ n-1 }+{ x }^{ n-2 }y+{ x }^{ n-3 }{ y }^{ 2 }+...+{ y }^{ n-1 } \right) }{ x-y } =\lim _{ y\to x } \left( { x }^{ n-1 }+{ x }^{ n-2 }y+{ x }^{ n-3 }{ y }^{ 2 }+...+{ y }^{ n-1 } \right) =n{ x }^{ n-1 }$$

• I think you should add to this correct algebra some words saying that this is just the derivation of the formula for the derivative of $x^n$. Commented Nov 2, 2017 at 17:08
• @EthanBolker,thank you, you just did it instead me Commented Nov 2, 2017 at 17:10
• But how and why? I can't understand what you are doing, why are you doing a series? Commented Nov 2, 2017 at 17:22
• @LuisE. This is a basic example factoring. The numerators in both limits are the same function, just expressed differently. After factoring like this, you can easily see that the denominator can be cancelled with a term in the numerator, and then the limit can be directly evaluated. Commented Nov 2, 2017 at 17:30
• @EthanBolker: why ? That is unnecessary to understand the answer.
– user65203
Commented Nov 2, 2017 at 17:33

I think this is easier when renaming the variables. Renaming $x$ to $a$ and $y$ to $x$ $$\lim_{y\to x} \frac{x^n-y^n}{x-y}=\lim_{x\to a} \frac{a^n-x^n}{a-x}$$ Now we can see that L'Hospital gives us: $$\lim_{x\to a} \frac{a^n-x^n}{a-x} = \lim_{x\to a} \frac{0-nx^{n-1}}{0-1} = nx^{n-1}$$ (The $a^n$ and $a$ are constants and become zero)
But L'Hospital may not be the best choice here.

You can also resort to the binomial theorem and set $h:=x-y$. Then

$$\frac{x^n-y^n}{x-y}=\frac{(y+h)^n-y^n}{h}=\frac{\binom n1y^{n-1}h+\binom n2y^{n-2}h^2+\cdots\binom nnh^n}h,$$ which, after simplification, tends to the first term,

$$ny^{n-1}.$$

This is the derivative for $y=x^n$, by definition. Using implicit differentiation and the fact that $\ln(x)=\int_{0}^{x} \frac{1}{t} dt$, and taking logs, we see that

$$\ln(y)= \ln(x^n) \implies \frac{1}{y} \frac{dy}{dx}=n \cdot \frac{1}{x} \implies \frac{dy}{dx}=n \cdot\frac{y}{x}=n \cdot x^{n-1}.$$

Note that this works for any nonzero $n \in \mathbb R$.

To find the limit

$\lim_{y\to x} \dfrac{x^n-y^n}{x-y}, \tag 1$

observe that

$x^n - y^n = (x - y) \displaystyle \sum_{i = 0}^{n - 1} x^{n - i - 1} y^i; \tag 2$

so for $y \ne x$,

$\dfrac{x^n - y^n}{x - y} = \displaystyle \sum_{i = 0}^{n - 1} x^{n - i - 1} y^i; \tag 3$

then

$\lim_{y \to x} \dfrac{x^n - y^n}{x - y} = \displaystyle \sum_{i = 0}^{n - 1} x^{n - i - 1}x^i = \sum_{i = 0}^n x^{n - 1} = nx^{n - 1}. \tag 4$

(4) just demonstrates the fact that the derivative of $x^n$ is $nx^{n - 1}$; however, we may in fact also apply L'hospital's rule to (1), since the limits of the numerator and denominator each exist and are $0$; we are dealing with an indeterminate form of the type $0/0$. Thus,

$\lim_{y\to x} \dfrac{x^n-y^n}{x-y} = \lim_{y\to x} \dfrac{d(x^n - y^n)/dy}{d(x - y)/dy} = \lim_{y\to x}\dfrac{-ny^{n - 1}}{-1} = nx^{n -1}, \tag 5$

in agreement with (4).

By the definition of the derivative: \begin{align} \lim_{y\to x}\frac{x^n-y^n}{x-y} &=\lim_{y\to x}\frac{y^n-x^n}{y-x}\\ &=\frac{\mathrm{d}}{\mathrm{d}x}x^n\\[6pt] &=nx^{n-1} \end{align}

As others have pointed out, by polynomial division, we also have $$\frac{y^n-x^n}{y-x}=\sum_{k=0}^{n-1}y^{n-k-1}x^k$$ which, as $y\to x$, tends to $nx^{n-1}$.

Comparing these two methods, the first is more advanced and perhaps a bit more elegant and can be applied to non-integer exponents. However, the second is more basic, with fewer prerequisites. In fact, the latter method is one way to compute the derivative of $x^n$ for $n\in\mathbb{N}$.