# Change of Variables in Limits (Part 1)

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?

• The answer by Pedro Tamaraff is good. I have a different counter example, a different proof and some notes how this applies to continuous functions here: limitinfinite.org/index.php/…
– user154971
Jun 3, 2014 at 16:28
• Oct 24, 2017 at 6:55

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$$.

• (Note this answer was posted before Jared added "If we suppose...", so it was intended as a complement of his counterexample)
– Pedro
Jul 31, 2013 at 0:46
• The definition of $f\to\ell$ as $x\to a$ is that for all $\epsilon>0$, there exists $\delta>0$ such that $0<|x-a|<\delta \implies |f(x)-\ell|<\epsilon$. I've noticed that both you and Jared omitted the part where $0<|x-a|$. Is this part unimportant? I can see that: $$0<|x-a|<\delta' \implies |x-a|<\delta' \implies |g(x)-b|<\delta$$ but how do we do know that $g(x) \neq b$ so that we can use the fact that: $$0<|g(x)-b|<\delta \implies |f(g(x))-\ell|<\epsilon$$ Jul 31, 2013 at 1:05
• @Adriano You're absolutely correct. Although it is certainly a minor detail.
– Pedro
Jul 31, 2013 at 1:08
• In the theorem statement, I think the neighborhood has to be of the point a, right? Jan 26, 2020 at 22:18
• this is probably the most used and most unkwnon theorem Jan 9 at 11:54

A counterexample. Let $a=b=0$, $g(x)=x^2$, and let

$$f(x)=\begin{cases}1&x\ge 0\\0&x<0\end{cases}$$

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

If we suppose that $\lim_{y\to b}f(y)$ exists, then the result holds.

First suppose that the limit is finite and equal to $L$. Fix $\epsilon>0$, and let $\delta$ be such that

$$|y-b|<\delta\Longrightarrow |f(y)-L|<\epsilon$$

Now, choose $\delta'$ such that

$$|x-a|<\delta'\Longrightarrow|g(x)-b|<\delta$$

Notice now that we have

$$|x-a|<\delta'\Longrightarrow|f(g(x))-L|<\epsilon$$

which shows that $\lim_{x\to a}f(g(x))=L$. The case of an infinite limit is shown similarly.