Why is $2$ considered a singular point for $f(x) = \frac{x-2}{x^2-x-2}$? Let $$g(x) = \frac{1}{x^2-x-2} = \frac{1}{(x-2)(x+1)}$$
The domain of this function in apparently $D(g) = \{x \in \mathbb{R} : x \neq \{2,-1\}\}$
Now let $$f(x) = \frac{x-2}{x^2-x-2} = \frac{x-2}{(x-2)(x+1)}$$
The graph suggests that its domain is also $D(f) = \{x \in \mathbb{R} : x \neq \{2,-1\}\}$

But, if we write $f$ as
$$f(x) = \frac{x-2}{(x-2)(x+1)} = \frac{1}{(x+1)} $$
We actually notice that $2$ is not a singular point. Basically, the denominator is not zero at $2$ therefore $2$ belongs to the domain of $f$.
Apparently, I am making a trivial mistake here but I can't understand what the mistake is. Could someone explain this to me?
 A: You have graphed the function the wrong way:
What you graphed is $x-\frac{2}{(x-2)(x+1)}$, instead of your function $\frac{x-2}{(x-2)(x+1)}$. There's a missing braket, add it and the error will be fixed. Write in the graphic calculator: (x-2)/((x-2)*(x+1)) instead.
A: A function does not only consist of a functional equation. Its domain and codomain are essential parts of a function, and you can have a function with the same functional equation but different domains and codomains. Often, the domain is not specified, and instead it's implied that the domain is the largest set on which the given functional equation is well-defined. With this in mind, the two functions
$$f(x)=\frac{x-2}{(x-2)(x+1)}$$
and
$$\tilde f(x)=\frac{1}{x+1}$$
are not the same. The expression in the functional equation of $f$ is well defined everywhere except $-1$ and $2$ (at $x=2$ you'd get the expression $\frac{0}{0}$, which is undefined), while the expression in the functional equation of $\tilde f$ is well-defined everywhere except $-1$. You could notice that if you do specify the domain of $f$ to exclude $2$, then their functional equations are the same, while they have different domains. But if you don't specify the domain, then it's implied by the fact that the equations are well-defined on different sets, and those sets are chosen as domains.
A: After "if we write $f$ as", you divide numerator and denominator by $x-2$. But for x=2, you divide by 0, and that's not allowed. The equation thus holds for all x except x=2.
A: The problem is that your given function is not $ {1\over x+1}$ but ${(x-2) \over (x-2)(x+1)}$.To  cancel two terms , you have to make sure they are not equal to zero, which they actually are here at x=2 . It will be similar to writing ${ 0\over 0}$ and then canceling the two terms to write that it equals to 1 , which it clearly does not.
By definition the domain of function of the form ${f(x) \over g(x)}$ does not include the points where g(x) =0.
You can always take the $\lim_{x->2}$ which will give 1/3 , but that does not mean the function is defined at x=2
