# Why does factoring eliminate a hole in the limit?

$$\lim _{x\rightarrow 5}\frac{x^2-25}{x-5} = \lim_{x\rightarrow 5} (x+5)$$

I understand that to evaluate a limit that has a zero ("hole") in the denominator we have to factor and cancel terms, and that the original limit is equal to the new and simplified limit. I understand how to do this procedurally, but I'd like to know why this works. I've only been told the methodology of expanding the $x^2-25$ into $(x-5)(x+5)$, but I don't just want to understand the methodology which my teacher tells me to "just memorize", I really want to know what's going on. I've read about factoring in abstract algebra, and about irreducible polynomials (just an example...), and I'd like to get a bigger picture of the abstract algebra in order to see why we factor the limit and why the simplified is equal to the original if it's missing the $(x-5)$, which has been cancelled. I don't want to just memorize things, I would really like to understand, but I've been told that this is "just how we do it" and that I should "practice to just memorize the procedure."
I really want to understand this in abstract algebra terms, please elaborate. Thank you very much.

• Very laudable that you want to understand instead of "just memorize". – Daniel Fischer Aug 7 '13 at 19:21
• The expression $\frac{(x+5)(x-5)}{x-5}=x+5$, just so long as $x\neq 5$, since $\frac{(x+5)(x-5)}{x-5}$ has the bad fortune of not being defined at $x=5$. – Baby Dragon Aug 7 '13 at 19:29
• I don't understand what your question is. Are you asking why the function $\frac{x^2-25}{x-5}$ is undefined at $x=5$? or why we're allowed to cancel $(x-5)$ from the top and bottom? or why the limits before and after cancellation are equal? – BlueRaja - Danny Pflughoeft Aug 7 '13 at 20:09
• @BlueRaja-DannyPflughoeft yes, all of those questions I'm asking :) – Emi Matro Aug 7 '13 at 22:35
• To answer the question - I've only been told the methodology of expanding the x2−25 into (x−5)(x+5). It goes like this: (in reverse) (x-5)(x+5) = x(x+5)-5(x+5) = x^2+5x-5x-25 = x^2-25 So, working above the other way takes x^2-25 back to (x-5)(x+5) – EtherDragon Aug 8 '13 at 22:52

## 13 Answers

First, and by definition, when dealing with

$$\lim_{x\to x_0}f(x)$$

we must assume $\,f\,$ is defined in some neighborhood of $\,x_0\,$ except , perhaps, on $\,x_0\,$ itself, and from here that in the process of taking the limit we have the right and the duty to assume $\,x\,$ approaches $\,x_0\,$ in any possible way but it is never equal to it.

Thus, and since in our case we always have $\,x\ne x_0=5\,$ during the limit process , we can algebraically cancel for the whole process.

$$\frac{x^2-25}{x-5}=\frac{(x+5)\color{red}{(x-5)}}{\color{red}{x-5}}=x+5\xrightarrow[x\to 5]{}10$$

The above process shows that the original function behaves exactly as the straight line $\,y=x+5\,$ except at the point $\,x=5\,$ , where there exists "a hole", as you mention.

• said hole can, of course be filled in by plugging it with the limit ... – Betty Mock Aug 13 '13 at 22:33
• Some definitions of the limit do not require that we consider points that are not equal to $x_0$. How do you handle these cases then? The definition goes as $\lim f(x) = L$ provided for each $\epsilon\gt 0$ there is some $\delta \gt 0$ such that $\vert x - x_0\vert \lt \delta\ldots$ and so on. – Alex Ortiz Sep 9 '16 at 15:50

This image of mine seems apropos: In the case of $\lim_{x\to 5} \frac{x^2-25}{x-5}$, the message here is: Away from $x=5$, the function $\frac{x^2-25}{x-5}$ is completely identical to $x+5$; thus, what we expect to find as we approach $x=5$ is the value $5+5$. This anticipated value is what a limit computes.

The fact that the original function isn't defined at $x=5$ is immaterial. Walley World may be closed for repairs when you arrive, but that doesn't mean you and your dysfunctional family didn't spend an entire cross-country road trip anticipating all the fun you'd have there.

• Extremely helpful answer as always, Blue. You're incredible at understanding what people are really asking and providing strong intuition. Thank you for your contribution to this site! – jeremy radcliff Jun 1 '15 at 15:55
• @Blue Your answer made me think something: Can we always find another function which - away from a certain value - is completely identical to the former function? I mean, what is done in this example is the following: We have an algebraic expression and we can find another algebraic expression that have that property. – Billy Rubina Jul 6 '17 at 1:21
• BTW: I read your image as the jingles in this video. – Billy Rubina Jul 6 '17 at 1:21

Let's consider a simpler example first. Consider the function $f(x) = \frac{2x}x$. This says you take some number $x$, multiply by 2, then divide by the original number $x$. Obviously the answer is always 2, right? Except that when $x$ is zero, the division is forbidden and there is no answer at all. But for every $x$ except 0, we have $\frac{2x}x = 2$. In particular, for values of $x$ close to, but not equal to 0, we have $\frac{2x}x = 2$.

The function $\frac{x^2-25}{x-5}$ is similar, just a little more complicated. Calculating $x^2-25$ always gives you the same as $(x-5)(x+5)$. That is, if you take $x$, square it, and subtract 25, you always get the same number as if you take $x$, add 5 and subtract 5, and then multiply the two results. So we can replace $x^2-25$ with $(x+5)(x-5)$ because they always give the same number regardless of what you start with; they are two ways of getting to the same place. And then we see that $$\frac{x^2-25}{x-5} = \frac{(x+5)(x-5)}{x-5} = x+5$$

except that if $x-5$ happens to be zero (that is, if $x=5$) the division by zero is forbidden and we get nothing at all. But for any other $x$ the result of $\frac{x^2-25}{x-5}$ is always exactly equal to $x+5$. In particular, for values of $x$ close to, but not equal to 5, we have $\frac{x^2-25}{x-5} = x+5$.

The limit $$\lim_{x\to 5} \ldots$$ asks what happens to some function when $x$ close to, but not exactly equal to 5. And while this function is undefined for $x=5$, because to calculate it you would have to divide by zero, it is perfectly well-behaved for other values of $x$, and in particular for values of $x$ close to 5. For values of $x$ close to 5 it is equal to $x+5$, and so for values of $x$ close to 5 it is close to 10. And that is exactly what the limit is calculating.

I think that what confuses you is the difference between "solving the algebraic expression", and "finding the limit". Given:

$$f_1=\frac{x^2-25}{x-5} \quad f_2 = (x+5)$$

Then, $f_1$ and $f_2$ are most definitely NOT the same function. This is because they have different domains: 5 is not a member of the domain of $f_1$, but it is in the domain of $f_2$.

However, when we go from: $$\lim _{x\rightarrow 5}\frac{x^2-25}{x-5} \quad to \quad \lim _{x\rightarrow 5}\frac{(x-5)(x+5)}{x-5} \quad to \quad \lim_{x\rightarrow 5} (x+5)$$

We are not saying that the expressions inside the limits are equal; maybe they are, maybe they are not. What we are saying that they have the same limit. Totally different statement.

Above, the transformation of the second expression to the third one allows us to find a different function for which a) we know that the limit is the same, and b) we know how to trivially calculate that limit.

The big question, then: what transformations can I make to the function $f_1$ so that the limit stays the same? I think this is usually poorly explained in introductory courses -- a lot of hand-waving going on.

Obviously you can do any algebraic manipulation that leaves $f_1$ unchanged. You can also make any manipulation that removes and/or introduces discontinuities (points for which the function does not exist), as long as the new function stays continuous for an arbitrarily small neighborhood around $a$ (except possibly at $a$ itself). Your example is a case of such a transformation.

Here I'm myself cheating because I'm not defining 'continuity' for you. I'm sorry; please use an intuitition of what continuous means ("no holes, no jumps"), until you are presented with a formal one.

More complex transformations exist, but they have to be justified individually. You'll get to them eventually.

• you clarified a lot, thanks – Emi Matro Aug 8 '13 at 20:08
• Sixth line from the end - "You" will be "Your". – MrAP Jul 5 '17 at 19:18
• @MrAP, thanks. You should feel free to post an edit directly – Euro Micelli Jul 6 '17 at 1:04

Here's the basic idea: You're given a rational function, $f\colon \Bbb R \setminus \{5\}\to \Bbb R$, which is continuous everywhere in its domain.

You want to find the limit of that function at $5$.

One way to do that is to construct a continuous extension of that function, $g\colon \Bbb R \to \Bbb R$, such that $g(x) = f(x)$ whenever $x$ is in the domain of $f$. Then $$\lim_{x\to 5}f(x) = \lim_{x\to 5} g(x) = g(5).$$

In this case, factoring and cancelling accomplishes that objective.

• i really like this idea of a "continuous extension", what is the formal name of this rule/theorem? I'd like to read more about it. Thanks for the answer @dfeuer – Emi Matro Aug 8 '13 at 20:07
• @user4150: Try this google search: "removable discontinuity" "continuous extension" – Dave L. Renfro Aug 8 '13 at 21:24
• @dfeuer Typo? It should be $$\lim_{x\to 5}f(x) = \lim_{x\to 5} g(x) = g(\color{royalblue}5).$$ – Hakim Oct 1 '14 at 8:06
• @Hakim, right you are. Fixed. – dfeuer Oct 1 '14 at 9:55

The chill pill you are looking for is

If $f_1$ = $f_2$ except at $a$ then $\lim _{x{\rightarrow}a}f_1(x)=\lim_{x{\rightarrow}a}f_{2}(x)$

• Yes! You made my day! – Jostein Trondal Apr 14 '16 at 16:42
• Assuming both function to be continuous at $x=a$. – Michael Hoppe May 26 '17 at 11:45

Intuitively, we can start the other way round, by simply considering $\lim_{x\rightarrow 5} (x+5)$ which we're all agreed we understand. Now consider, independently,

$$\frac{x-5}{x-5}$$

this is obviously 1 everywhere, except where it's undefined at $x = 5$. So, what would you expect to be the effect of multiplying the two? It's just multiplying by 1, except that it also introduces a hole at $x = 5$

To understand this more broadly, it is convenient to check L'Hôpital's rule, which basically boils down to this:

Given a function $f(x)=\frac{g(x)}{h(x)}$, where for some $x=x_0$ both $g(x_0)=0$ and $h(x_0)=0$, the actual value $f(x_0)$ can be obtained as*

$$\lim_{x\to x_0}f(x) = \lim_{x\to x_0}\frac{g'(x)}{h'(x)}$$

(where the prime denotes derivation by $x$) Note that if $g'(x_0)=0=h'(x_0)$, you can re-apply the same rule again and again until either numerator or denominator are not 0. In your example, we get

$$\lim_{x\to 5}\frac{x^2-25}{x-5} = \lim_{x\to 5}\frac{2x}{1}=10=\lim_{x\to5}\,(x+5)$$

To get an even deeper understanding, the rule's proof might be an interesting read.

*: This is only one case, you can also have $|g(x_0)|=|h(x_0)|=\infty$, but not $g(x_0)=0$ and $f(x_0)=\pm\infty$

• I don't think it's appropriate to bring up L'Hôpital in a question like this. To justify the rule, the reader needs to be familiar with derivatives, differentiability, the sandwich theorem and Cauchy's mean value theorem just to get started. The OP is asking for understanding, not higher-level magic hand-waving. L'Hôpital's rule is a great practical tool, but it's also wielded too often as a substitute for thinking. – Euro Micelli Aug 8 '13 at 11:53
• @EuroMicelli Woah there, I didn't intend to hand-wave magically, I just wanted to provide a different answer that, if one is interested enough, can not only explain the removable singularities in polynomial fractions but also in more complicated cases. Though I agree one shouldn't blindly apply Hôpital to just anything if there is another maybe more elegant way – Tobias Kienzler Aug 8 '13 at 13:04
• Also you don't obtain the $f(x_0)$ value - you get $f(x_0)$ value provided it is defined and $f$ is continous. The OP function is not defined at $5$ but it's limit is. – Maciej Piechotka Aug 9 '13 at 7:05
• @MaciejPiechotka True, stricly speaking the example function is equivalent to $$f(x) = \begin{cases} x+5 & x\neq 5 \\ \text{undefined} & x = 5\end{cases}$$ but the singularity at $x=5$ is removable as in $$f(x)= \begin{cases}\tfrac{x^2-25}{x-5} & x\neq 5 \\ 10 & x=5 \end{cases} \Rightarrow f(x) \equiv x+5$$ But you're right that one should always keep removed singularities in mind as they may have severe influence to e.g. applications in Physics (though I can't tell one ad hoc) – Tobias Kienzler Aug 9 '13 at 7:10

One of definitions of $\lim_{x \to A} f(x) = B$ is:

$$\forall_{\varepsilon > 0}\exists_{\delta > 0}\forall_{0 < \left|x - A\right| < \delta}\left|f(x) - B\right| < \varepsilon$$

The intuition is that we can achieve arbitrary 'precision' (put in bounds on y axis) provided we get close enough (so we get the bounds on x axis). However the definition does not say anything about the value at the point $f(A)$ which can be undefined or have arbitrary value.

One of method of proving the limit is to find the directly $\delta(\varepsilon)$. Hence we have following formula (well defined as $x\neq 5$):

$$\forall_{0 < \left|x - 5\right| < \delta}\left|\frac{x^2-25}{x-5} - 10\right| < \epsilon$$

As $x\neq 5$ (in such case $\left|x - 5\right| = 0$) we can factor the expression out

$$\forall_{0 < \left|x - 5\right| < \delta} \left|x + 5 - 10\right| < \varepsilon$$ $$\forall_{0 < \left|x - 5\right| < \delta} \left|x - 5 \right| < \varepsilon$$

Taking $\delta(\varepsilon) = \varepsilon$ we find that:

$$\forall_{\varepsilon > 0}\exists_{\delta > 0}\forall_{0 < \left|x - 5\right| < \delta}\left|\frac{x^2-25}{x-5} - 10\right| < \varepsilon$$

The key thing is that we don't care about value at the limit.

Look at this example:

$$\lim _{\text{thing} \to zero}(\dfrac{\text{Thing}}{\text{Thing}}) \cdot \text{Another thing}$$

Here our $\text{'Thing'}$ is tending to zero, but not zero, it is something real, call it a real $\text{Thing}$, which can be cancelled merrily.

• What do you have against using letters as variables? – JMCF125 Mar 8 '14 at 18:54

The hole doesn't always disappear but when it does it is because one expression is equivalent to another except right at that hole. For example $$\frac{x^2 - 25}{x - 5}= \frac{(x+5)(x-5)}{x-5}= (x + 5)$$ everywhere except at x = 5. However, if we are very close to 5 and we had infinite place arithmetic (as we do theoretically) the calculation of the first expression $\frac{x^2 - 25} {x - 5}$ would be very close to the last expression $(x+5)$, that is the limit as x approaches 5 of the first expression is the same limit as the limit as x approaches 5 of last expression. Since that latter is a 'nice number', we can define the value at 5 for the first expression and remove the "everywhere except at $x = 5$" by just putting 10 as the value and not calculating it.

The trick is to think of limit a bit differently: A limit is the value a function would have at a point were it continuous at that point, with nothing else being different.

You can see this by comparing the epsilon-delta definitions of the two concepts. We say $f$ is continuous at $c$, if $f$ is defined at $c$ and for every $\epsilon > 0$ there is a $\delta > 0$ such that

$|f(x) – f(c)| < \epsilon$ whenever $0 < |x – c| < \delta$.

Likewise, $f$ has limit $L$ at $c$ if for every $\epsilon > 0$ there is a $\delta > 0$ such that

$|f(x) – L| < \epsilon$ whenever $0 < |x – c| < \delta$.

The key idea behind continuity is we can approximate the function's value at $c$ arbitrarily well by picking $x$ suitably close to $c$. It allows us to “evaluate the function approximately at $c$ given a suitably-good approximate 'measurement' of $c$”, or that "we can gain insight into the function's values at an unknown exact point through approximate measurements of that point.". A limit says there is some value the function approximates arbitrarily well at $c$ as $x$ is chosen suitably close to $c$. So if we changed a function so its value at $x = c$ were such as to make it continuous there, that value will be its limit. Indeed, you can see from the above that if $f(x)$ has value $f(c)$ at $x = c$, then that will be its limit $L$, by plugging it into the latter set of inequalities, and conversely that if $f(x)$ has limit $L$ at $x = c$, if we define $f(c) = L$ then $f$ will be continuous at $c$, by plugging into the former set of inequalities.

(The above definitions are more immediately grasped if you write $d(x, y)$ instead of $|x - y|$ where the former is read "distance between $x$ and $y$".)

So when we factor, say $\frac{x^2 – 25}{x – 5}$, we get $\frac{(x + 5)(x – 5)}{(x – 5)} = x + 5$, and the right side is continuous everywhere on $\mathbb{R}$, as can be shown by an epsilon-delta argument. Since the right side is continuous while the left is not at $x = 5$, then using the above ideas about limits, the value that $x + 5$ has at $x = 5$ must be the limit of the original function at $x = 5$.

The idea is that if two functions $f$ and $g$ differ only at $a$ but are identical otherwise, we have $\displaystyle \lim_{x \to a} f(x) = \lim_{x \to a} g(x)$. In this case $f(x) = \dfrac {x^2-25}{x-5}$ and $g(x) = x+5$ are identical everywhere except $x=5$, so $\displaystyle \lim_{x \to 5} \dfrac {x^2-25}{x-5} = \lim_{x \to 5} x+5 = 10.$