Why does $ \lim_{x \to 2} \frac{x^2-4}{x-2} =4 $ if x cannot be 2? I know that $ \lim_{x \to 2} \frac{x^2-4}{x-2} $ is evaluated as follows :-
$$ \lim_{x \to 2} \frac{x^2-4}{x-2} \\ = \lim_{x \to 2} \frac{(x+2)(x-2)}{x-2} \\ = \lim_{x \to 2} x+2 \\ = 2+2 \\ = 4 $$
By looking at the function $ \frac{x^2 - 4}{x - 2} $, I can see that 2 is not in its domain. Therefore, I am not able to understand how $ \lim_{x \to 2} x+2 = 2+2 $.
 A: Limits are what a function approaches as $x$ approaches a value, and are do not depend on the value of the function itself. Here, as $x$ becomes arbitrarily close to $2$, $\frac{x^2-4}{x-2}$ becomes arbitrarily close to $4$ and so we say its limit as $x\rightarrow 2$ is $4$. Note that the fact that the function is not defined at $x=2$ is irrelevant.
Here is a picture if that clears things up: 
Note that when $x$ is very close to $2$, the function is very close to $4$ even if it's undefined precisely at $2$.
A: Limit doesn't have to do with the existence of function at that point. In the context of the given problem, 
$$f(x) = \frac{x^2-4}{x-2}= \frac{(x-2)(x+2)}{x-2}$$
We study the behavior of $f$ as $x$ approaches a certain point. For example let's study the RHL by considering the value of $f$ at some points: 
$$f(2.01) = 4.01$$
$$f(2.001) = 4.001$$
$$f(2.0001) = 4.0001$$
You see how when we move $x$ closer to $2$, $f(x)$ gets closer to $4$. 
Similarly for the LHL, 
$$f(1.99) = 3.99$$
$$f(1.999) = 3.999$$
$$f(1.9999) = 3.9999$$
The same thing happens when we approach $x$ closer to $2$, $f(x)$ gets closer to $4$. 
Now in short hand we can do it like this
$$\lim_{x \to 2} \frac{(x-2)(x+2)}{x-2}$$
Now since $ x \neq 2$, $x - 2 \neq 0$. Therefore we can cancel the factor in the numerator and denominator above. Hence we get
$$\lim_{x \to 2} \frac{(x-2)(x+2)}{x-2}$$
$$=\lim_{x \to 2} x+2$$
$$=4$$
A: It simply means that $f(x)$ approaches $4$ from both sides as $x$ approaches $2$. The function does not need to be defined at that point, although it could. The function $f(x) = \frac{x^2-4}{x-2}$ is exactly the "same" as the function $f(x) = x+2$ at all points except $x = 2$, where there is a removable discontinuity, or a gap, in the former function. Therefore, whatever value $x+2$ takes at $x=2$ will be equivalent to the value $\frac{x^2-4}{x-2}$ approaches as $x \to 2$. The fact that the function is undefined at that point doesn't change this.
A: 
By looking at the function $$ \frac{x^2 - 4}{x - 2},$$ I can see that $2$ is not in its domain. Therefore, I am not able to understand how $ \lim_{x \to 2} x+2 = 2+2 $.

A point need not be in the domain of a function for the function to have a limiting value at that point. The only condition is that the function be defined at infinitely many points near the point in question. Thus, we can also calculate the limits of functions at infinity. I will assume that you will agree that infinity cannot be in the domain of most functions you know and are likely to deal with for some time yet. Despite this, some functions do have finite limits at infinity. An elementary example is the sequence defined by $1/n,$ whose limit at $\infty,$ as you'll confirm, is $0,$ despite the fact that there is no greatest positive integer. We could multiply many such examples. Indeed, this is the power of limits -- they allow us to extend functions in this way.
In sum, a function need not be defined at a point for it to have a limit there; limits are defined at points that are surrounded by infinitely many points in the domain of a function, whether or not the surrounded point itself belongs to this domain. Of course, this does not mean that they always exist.
Thus, your improper rational function may not be defined at $x=2,$ but it is defined at all points arbitrarily close to this point. Hence, we can take its limit at $2.$ In this case this turns out to be $4,$ as you've rightly determined.
Good luck!
