TITLE: Change of Variables in Limits (Part 1)
QUESTION [16 upvotes]: After answering this question, I was wondering if the following generalization holds true:

Claim: If $\lim \limits_{x\to a}g(x)=b$, then $\lim \limits_{x\to a}f(g(x))=\lim \limits_{y\to b}f(y)$.

I've seen some people use this change of variables before when evaluating difficult limits, but I haven't seen this presented as a theorem in a textbook. Is this claim true? If not, is the claim salvageable with additional hypotheses? For example, must $f$ be continuous for the claim to hold?

REPLY [13 votes]: You certainly need some assumptions on $f,g$, as Jared shows.

THM Suppose that $f(y)\to \ell$ as $ y\to b$. Suppose that ${\rm im}\, g\subseteq {\rm dom}\, f$, and suppose that $g(x)\to b$ as $x\to a$, yet $g$ does not attain the value $b$ in a neighborhood $B(x,\eta)-\{x\}$. Then $$f\circ g(x)\to \ell \;\;\text{ as } x\to a$$

P Let $\epsilon >0$ be given. Since $f\to\ell $ as $y\to b$ there exists $\delta >0$ such that $0<|y-b|<\delta$ implies $|f(y)-\ell|<\epsilon$. Since $g\to b$ as $x\to a$, there exists $\eta >\delta'>0$ such that $0<|x-a|<\delta'$ implies $0<|g(x)-b|<\delta$. But then we will have $|f(g(x))- \ell|<\epsilon$ whenever $0<|x-a|<\delta'$, so the claim follows. $\blacktriangle$
This then gives the standard

COR Suppose that $f$ is continuous at $g(a)$ and $g$ is continuous at $a$. Then $f\circ g$ is continuous at $a$.