# Why are the two limits equal?

I want to show that if $g$ is continuous at $a$ and $f$ at $g(a)$, then $$\lim_{x \to a}{\frac{f(g(x))-f(g(a))}{g(x)-g(a)}} = \lim_{x \to g(a)}{\frac{f(x)-f(g(a))}{x-g(a)}}$$ Now I know that continuity implies that $$\lim_{x \to a}{f(g(x))} = \lim_{x \to g(a)}{f(x)} = f(g(a))$$ and $$\lim_{x \to a}{g(x)} = \lim_{x \to g(a)}{x} = g(a)$$ so it is quite easy to see that the two original limits are equal. How do I prove this?

I cannot repeatedly use the limit laws since I get a limit that is zero ($\lim_{x \to a}{(g(x)-g(a))}$) and so cannot apply the quotient rule.

• I think you want $f$ continuous at $g(a)$, not $g$ at $f(a)$ – Thomas Andrews Jul 5 '15 at 13:42
• Have you tried using the definition of the limit and continuity in the $\epsilon$-$\delta$-language? That is a reasonable way to go about this. – Joonas Ilmavirta Jul 5 '15 at 13:45
• If $f(x) = x$ and $g(x) = 1$ for all $x$, then the right limit exists (and equals $1$), but the left doesn't. – Antoine Jul 5 '15 at 13:57
• You have to be very careful about the cases where $g(x)=g(a)$ for lots of $x$ close to $a$. – Thomas Andrews Jul 5 '15 at 14:02
• Sorry, I forgot to mention that I'm assuming that $g(x) \neq g(a)$ for all $x$ in some neighborhood around $a$ (except at $a$). – Simeon Jul 5 '15 at 14:59

Right, you need to show that:

$$\lim_{x\to a} h(g(x))=\lim_{y\to g(a)} h(y)$$

when $g$ is continuous at $a$. This is true if the right hand side exists, and if $g(x)\neq g(a)$ in some neighborhood of $a$ except when $x=a$ (with this condition, you don't need $h(g(a))$ defined, which is good for your above case.)

To show that the left side can exist, but the right side not, just take;

$$g(x)=\begin{cases}0&x=0\\ \frac{1}{\lceil 1/|x|\rceil}&x\neq 0 \end{cases}$$

The $\lim_{x\to 0} g(x)=0$.

Now define $h(x)=\sin(\pi/x)$.

Then $\lim_{y\to 0} h(y)$ does not exist, but $\lim_{x\to 0} h(g(x))$ does.

So, let's assume $\lim_{y\to g(a)} h(y)$ exists and equals $L$, and that $g(x)\neq g(a)$ for $x\neq a$ and $|x-a|<\alpha$ for some $\alpha>0$, and that $g$ is continuous at $a$.

Given $\epsilon>0$ this means there is a $\delta>0$ so that if $|y-g(a)|<\delta$ and $y\neq g(a)$ then $|h(y)-L|<\epsilon$.

Since $g$ is continuous at $a$, this means that there is a $\delta_2$ such that if $|x-a|<\delta_2$ and $x\neq a$, we have $|g(x)-g(a)|<\delta$ and if $g(x)\neq g(a)$, we can conclude that $|h(g(x))-L|<\epsilon.$ So if $|x-a|<\min(\delta_2,\alpha)=\delta_3$ we know that $h(g(x))-L|<\epsilon$.