TITLE: Why does limit not exist?
QUESTION [5 upvotes]: I don't understand how the limit does not exist for the composite function. The limit as x approaches -2 for g(x) is zero. So, the last step is to evaluate h(0), which is -1. Yes, there is a hole at x=0 but that doesn't mean you can't evaluate h(0).

REPLY [7 votes]: It's true that $\lim_{x\to-2}g(x)=0$, but as $g(x)$ goes to $0$, it gets there from two directions. Namely, from above and from below. It goes through values like $-0.1$, $-0.001$, $-0.0001$, etc. from below and through values like $0.1$, $0.001$, $0.0001$, etc. from above. That's equivalent to evaluating $\lim_{x\to 0}h(x)$ which, according to the theory of limits, is really two one-sided limits under the hood. And what does the function $h(x)$ approach as you go to $0$ from the right and from the left?
$$\lim_{x\to 0^-}h(x)=1$$ and $$\lim_{x\to 0^+}h(x)=-1.$$
Those two limits don't agree and thus the limit itself does not exist.

REPLY [4 votes]: For the limit to exist the following must hold:
$$\lim_{x\uparrow-2}h(g(x))=\lim_{x\downarrow-2}h(g(x))=h(g(0)),$$
Looking at the picture we can see that the left limit
$$\lim_{x\uparrow-2}h(g(x))=\lim_{x\uparrow0}h(x)=1$$
the right limit
$$\lim_{x\downarrow-2}h(g(x))=\lim_{x\downarrow0}h(x)=-1$$
and $h(g(-2))=h(3)=1$.