# How to Prove the Chain Rule for Limits Using a $\varepsilon$-$\delta$ Argument?

I came across the chain rule for limits the other day and it interested me quite a bit and surprisingly I couldn't find the proof on the internet anywhere. From what I understand the chain rule for limits states that if:

$$\lim_{x\to c} g(x)=M$$ and $$\lim_{x\to M} f(x)=L$$ then$$\lim_{x\to c} \ f(g(x))=L$$

1.Under what conditions does this hold true?

2.What is the epsilon-delta proof for the rule?

• @user I was hoping to get only simpler understanding of this. I'm only beginning my second year as an undergrad. Is this a proof that can only be done with higher analysis? – Red Dec 19 '15 at 5:01
• Not really a duplicate in so far as the answer gives a sequential proof, whereas an epsilon-delta proof is requested here. – James S. Cook Dec 19 '15 at 5:01
• See supermath.info/OldschoolCalculusII.pdf page 83. – James S. Cook Dec 19 '15 at 5:05
• if you want to preserve your question and my answer, just ask the question again with a focus on the epsilon delta proof. In a different time it may survive. It is a reasaonable question. – James S. Cook Dec 19 '15 at 13:45
• @ClaudeLeibovici: Hi there, I think this is not really a duplicate! In this question an $\varepsilon-\delta$ proof is requested while in the other question a sequential proof is requested! Cheers. :-) – H. R. Dec 20 '15 at 13:12

Claim: Suppose $f$ and $g$ are functions such that $\lim_{x \rightarrow a} f(x) = L_1$ and $\lim_{y \rightarrow L_1} g(y) = L_2$ then $\lim_{x \rightarrow a} g ( f(x)) = L_2$.

Proof: Let $\epsilon > 0$ and choose $\delta >0$ such that if $0<|x-a|<\delta$ then $|f(x)-L_1|< \delta_2$ where $\delta_2 >0$ is small enough to force $|g(y)-L_2| < \epsilon$ for all $y \in \mathbb{R}$ such that $0 < |y-L_1| < \delta_2$.

We can choose $\delta_2 > 0$ as above because we were given that $\lim_{y \rightarrow L_1} g(y) = L_2$. Further, we can also choose $\delta >0$ to force $|f(x)-L_1| < \delta_2$ because we were also given that $\lim_{x \rightarrow a} f(x) = L_1$.

Suppose that $x \in \mathbb{R}$ such that $0 < |x-a| < \delta$ and observe that $|g(f(x))-L_2 | < \epsilon$. Therefore, by the definition of the limit, $\lim_{x \rightarrow a} g ( f(x)) = L_2$. $\Box$

Thanks to Vim for correcting comment. Let me attempt a modified proof, it may be useful to locate the error in the logic above,

Modified Claim: Suppose $f$ and $g$ are continuous functions such that $\lim_{x \rightarrow a} f(x) =L_1$ and $\lim_{y \rightarrow L_1} g(y) = L_2 = g(L_1)$ then $\lim_{x \rightarrow a} g ( f(x)) = L_2$.

Modified Proof: Since $\lim_{x \rightarrow a} f(x) = f(a)=L_1$ it follows that for each $\delta_2 >0$ there exists $\delta>0$ such that $0 < |x-a|< \delta$ implies $|f(x)-L_1| < \delta_2$.

Let $\epsilon>0$ and pick $\delta_2>0$ such that $0< |y-L_1|< \delta_2$ implies $|g(y)-L_2| < \epsilon$. This choice of $\delta_2$ is possible since we are given that $\lim_{y \rightarrow L_1} g(y) = L_2$.

Suppose that $x \in \mathbb{R}$ such that $0 < |x-a| < \delta$ implies $|f(x)-L_1| < \delta_2$. Thus, for $y=f(x)$,we have $|y-L_1|< \delta_2$. We don't quite have what is needed to conclude just yet since we need $0<|y-L_1| < \delta_2$ in order to conclude $|g(y)-L_2|=|g(f(x))-L_2 | < \epsilon$. Consider two cases:

1. $0=|y-L_1|$ in which case $y=L_1$ hence $|g(L_1)-L_2| = |g(L_1)-g(L_1)| = 0 < \epsilon$
2. $0< |y-L_1|<\delta_2$ in which case we have $|g(y)-L_2|=|g(f(x))-L_2 | < \epsilon$

Hence, in all cases possible,$0 < |x-a| < \delta$ implies $|g(f(x))-L_2|< \epsilon$. Therefore, by the definition of the limit, $\lim_{x \rightarrow a} g ( f(x)) = L_2$. $\Box$

Of course, we can also state this result as it is often applied: the continuity of the outer function allows us to pull the limit inside out: $$\lim_{x \rightarrow a} g(f(x)) = g \left( lim_{x \rightarrow a} f(x) \right)$$ where once again I should emphasize, the continuity of $g$ at $lim_{x \rightarrow a} f(x)$ is assumed.

• This is not true. You need extra conditions. For example, let $f(x)\equiv 0$ and $g(y)=0,y\ne 0,g(0)=1$. – Vim Dec 19 '15 at 5:39
• @Vim Yes. So continuity of the "outer function" or the inner function never equals its limit except, possibly at the limit point, for some neighborhood of the limit point. And this latter is violated in your example. So, yes. You are correct. We need some added assumption to ensure validity. – Mark Viola Dec 19 '15 at 6:31
• @NajibIdrissi The most common definition of limit requires a punctured neighbourhood, i.e. $y\ne 0$ in this example. The point that the variable tends to doesn't even have to lie in the domain of definition, for example $\lim_{x\to 0}(\sin x)/x=1$. I've never heard of a definition of limit that doesn't specifically require a punctured neighbourhood. – Vim Dec 19 '15 at 8:56
• @NajibIdrissi thanks for comments, sadly, in the case of my answer I had assumed a deleted limit (if you read my notes which I would not expect...). So, Vim's criticism was on point. I hope my modified proof clarifies why the continuity of the outside function is needed. Naturally, the counter example Vim gave picks at precisely the same weak point in my initial (wrong) proof. – James S. Cook Dec 19 '15 at 13:42
• @Vim Thanks for the correction. – James S. Cook Dec 19 '15 at 20:17