TITLE: Why does simplifying a function give it another limit
QUESTION [27 upvotes]: I'm asked: 
$$\lim_{x\to 1} \frac{x^3 - 1}{x^2 + 2x -3}$$
This does obviously not evaluate since the denominator equals $0$. The solution is to: 
$$\lim_{x\to 1} \frac{(x-1)(x^2+x+1)}{(x-1)(x+3)}$$
$$\lim_{x\to 1} \frac{x^2 + x + 1}{x + 3}$$
$$\frac{1+1+1}{1+3} = \frac{3}{4}$$
My question: what is actually happening? How can simplifying a function give it another limit? Is it a complete other function and if so why would it be relevant to our original question?

REPLY [5 votes]: What's happening is the following: The given expression $\Phi(x)$ is undefined at $x=1$, but for all $x\ne1$ it is equal to some simpler expression $\Psi(x)$, which is defined and continuous at $x=1$. It follows that
$$\lim_{x\to1}\Phi(x)=\lim_{x\to1}\Psi(x)=\Psi(1)={3\over4}\ .$$