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. 
 A: 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$
A: 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$
A: 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.
A: 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.
A: 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.
A: 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.
A: 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.
A: 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$.
Thus, if we have a function with isolated gaps and there is a different function $f^{*}$ such that

*

*$f^{*}(x) = f(x)$ wherever $f(x)$ is defined and continuous,

*$f^{*}$ is defined and continuous everywhere, i.e. has domain $\mathbb{R}$ (versus the original function having domain $\mathbb{R}$ minus a set of isolated points),

then we must have that the value this $f^{*}$ takes at the points where $f$ was not defined or continuous must be the limiting values at those points.
And that's what you find by cancellation: by rewriting the expression describing the function in a form that involves only addition and multiplication with no division, you have created a formula that describes a function that must agree where the division part is defined, but since no division is involved, is defined everywhere. Moreover, since addition and multiplication (and powers, though you can consider them repeated multiplication) are continuous, then it follows that this function must be continuous as well. Hence the above are met, and the holes fill in.
A: 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.
A: 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.
A: 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. 
A: 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)$

A: 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.$
A: In limits the value of x is always tending and not exact
x→a means the value of x tends to a. Similarly  x→5 means tending to 5. So basically the value of x is not 5, but a little more or less than 5.
Hence you cannot take the denominator 0 in any case as the denominator will be, again, tending to zero. That is why we try to factorize the numerator first in order to check if there are any terms common both on the numerator and the denominator.
A: $$L:=\lim_{x\to x_0}f(x)$$ is the value that would make $f$ continuous at $x_0$.
If you known another function $g$ which is continuous and coincides with $f$ around $x_0$, then perforce
$$L=g(x_0).$$
