Why do we have to factorize the function before taking its limit I am learning about limits and there is something that I cant quite understand:
If we have the function:

$$
f(x) =\frac{x^2-1}{x-1}
$$

Let's say that we want to see which value for y (image) the function approaches as x (domain) gets closer to 1. On a nutshell, we have to take this following limit:

$$
\lim_{x\to1}\frac{x^2-1}{x-1}
$$

As soon as we look to this function, we realize that the function is not continuous at x = 1 (By the way, can I say that?). 
I know the algorithm to figure out the solution of the limit:
First, there is the need of eliminating the function discontinuity. Usually, it is just a matter of factorizing the function into a new function which the exactly same image as the one before with one crucial difference: The function is continuous for all real numbers 
My doubts:Is my way to think about it correct? Can I think like that?
Take the example above:  

$$
f(x) = \frac{x^2-1}{x-1}
$$

After factorizing, we get:
$$
f(x) = {x+1}
$$
If we plot both functions, they are the same, although the second one has its continuity all along the real numbers domain
Thanks in advance
 A: By the definition of the limit if $x\rightarrow1$ so $x\neq1$.
Id est, $$\lim_{x\rightarrow1}\frac{x^2-1}{x-1}=\lim_{x\rightarrow1}(x+1)=2.$$
A: Finding limit as $x \rightarrow a$ is different from finding the value of the function 
at $x=a$ because $f(a)=\frac{(x-a)(x+a)}{(x-a)}=0/0$ we cannot cancel $(x-a)$ But in  finding the limit $x \rightarrow a~\frac{(x-a)(x+a)}{x-a}= \lim_{x \rightarrow a}$ (x+a), we can cancel them and get the limit as $2a$. This is why/how the factorization helps in some questions. 
A: Short Answer: you don't always have to factorise to take a limit:

$$
f(x) =\lim_{x \rightarrow 1}\frac{x^2-1}{x-2} = \lim_{x \rightarrow 1}\frac{0}{-1} = 0
$$

But in your example we have.

$$
f(x) =\lim_{x \rightarrow 1}\frac{x^2-1}{x-1} = \lim_{x \rightarrow 1}\frac{0}{0} = ?
$$

The rules of maths do not allow division by zero so this is undefined for $ x = 1 $, However.
$\require{cancel}$

$$
f(x) =\lim_{x \rightarrow 1}\frac{x^2-1}{x-1} = \lim_{x \rightarrow 1}\frac{(x+1)\cdot\cancel{(x-1)}}{\cancel{(x-1)}} = \lim_{x \rightarrow 1}(x+1) = 2
$$

Note: the function is still not defined for $ x = 1 $, but that is the value you approach as $ x $ gets closer and closer to 1. 
