Why are we allowed to cancel fractions in limits? For example:

$$\lim_{x\to 1} \frac{x^4-1}{x-1}$$

We could expand and simplify like so:

$$\lim_{x\to 1} \frac{(x-1)(x^3 + x^2 + x + 1)}{x-1} = \lim_{x\to 1} (x^3 + x^2 + x + 1) = (1^3 + 1^2 + 1^1 + 1) = 4$$

In this case we divided out $x-1$ on top and bottom even though technically, at $x=1$, we have $\frac{0}{0}$ that we're just tossing aside.

But what allows us to do this?
Simply because we are dealing with values $x\neq 1$ in this case, thus for algebraic rule we are allowed to cancel out

$$\lim_{x\to 1} \frac{x^4-1}{x-1}=\lim_{x\to 1} \frac{\color{red}{(x-1)}(x^3 + x^2 + x + 1)}{\color{red}{x-1}}$$

Remember indeed that by the definition of limit we are demanding that
$$\forall \varepsilon&gt;0 \quad \exists \delta&gt;0 \quad \text{such that}\quad \color{green}{\forall x\neq1}\quad|x-1|&lt;\delta \implies|f(x)-L|&lt;\varepsilon$$

Note also that the same cancellation is used to prove the basic derivatives case, for example for $f(x)=x^2$

$$\lim_{x\to x_0}\frac{x^2-x_0^2}{x-x_0}=\lim_{x\to x_0}\frac{\color{red}{(x-x_0)}(x+x_0)}{\color{red}{x-x_0}}=\lim_{x\to x_0}(x+x_0)=2x_0$$
Well, the simple answer is: Because limits never depend on values in single points, so we are allowed to modify the limited function in finitely many points without changing the limit.


Either the point is the one in which we are taking the limit; but we know that it's excluded.
Or it's any other point, and than it's "far away" from the limit point and can be ignored altogehter.


However, you of course cannot do crazy stuff like claiming that
$$ \lim_{x\to0-} \frac{x\sqrt{x}}{\sqrt{x}} = \lim_{x\to0-} x = 0$$
because here you modify the domain of the function in more than finitely many points.