TITLE: What exactly is going on when we're finding a limit?
QUESTION [6 upvotes]: I understand that there are point discontinuities in certain functions, and that there are sometimes values that these functions approach from both sides of the discontinuity. Then the limit exists, and it's a useful thing to know.
Assuming that's right, I still have a problem with this process of finding limits. Is the point to muck about with the function algebraically until there isn't a discontinuity - and that's it? So far in my classes it just seems like we play around until there are no zero divisors and then poof it's all working. It just seems a little fishy.
What should I read about to gain a deeper appreciation for what's going on?

REPLY [5 votes]: Theorem: Suppose that $f(x) = g(x)$ for all $x \neq a$. Then, if either limit in the equation
  $$ \lim_{x \to a} f(x) = \lim_{x \to a} g(x) $$
  exists, then they both exist, and the equation holds.

This is the theorem you are implicitly using when you write an equation like
$$ \lim_{x \to 0} \frac{x}{x} = \lim_{x \to 0} 1 $$