TITLE: Can I cancel out quotient function safely?
QUESTION [5 upvotes]: Can you actually cancel out the numerator and denominator?
$$f(x) = \frac{x^3-8}{x-2}$$
This function is not defined at $x=2$ so the domain of it is "all real numbers except 2".
$f(x)$ can be rearranged into 
$$\frac{(x^2+2x+4)(x-2)}{x-2}$$
When I cancel out the $x-2$, I get $x^2+2x+4$ which is defined at all real numbers. Let $g(x) = x^2+2x+4$. Are $f(x)$ and $g(x)$ different functions?
Am I correct to say $f(x)$ is not continuous at $2$, because I can't find $f(2)$?
I am curious about this because I saw this guy at http://www.youtube.com/watch?v=7tKq2NL0GJ4 You can scroll to 4:00 minute where he tries to find continuity of f(x) at x=2. I think that his method is incorrect because f(2) is undefined and you should answer that f(x) is not continuous x=2 immediately. Am I right?

REPLY [4 votes]: You are right, $f$ and $g$ are different functions since they don't have the same domain. 
And, yes, $f$ is not continuous at $2$ because it is not defined at $2$.

If we talk about limits then you can use the fact that if $f(x) = g(x)$ except at $x=a$, then
$$
\lim_{x\to a} f(x) = \lim_{x\to a} g(x).
$$
So now you note that for any $x\neq 2$, you indeed have
$$
\frac{x^3 - 8}{x-2} = x^2 + 2x + 4.
$$
And so
$$
\lim_{x\to 2} \frac{x^3 - 8}{x-2} = \lim_{x\to 2} x^2 + 2x + 4 = \dots
$$