I always thought that this theorem was true, but today when asking about the proof of the chain rule in calculus I realized that it is false. I understand the counterexample, but now I don't understand where my proof fails. (Here is my attempt to prove the chain rule in calculus and the counterexample is in the answer).


Let $A,B\subseteq \mathbb{R}$, $f:A\longrightarrow B$, and $g:B\longrightarrow \mathbb{R}$ functions. Let $a\in R$ be an accumulation point of $A$. Let's suppose that $\lim_{x\to a}f(x)=b$ and $\lim_{x\to b} g(x)=l$. Then $\lim_{x\to a}(g\circ f)(x)$ exists and equals $l$.


Let $\epsilon>0$ be an arbitrary number in $\mathbb{R}$. Since $\lim_{x\to b} g(x)=l$ then there is $\delta >0$ in $\mathbb{R}$ such that $\forall x\in B (0<|x-b|<\delta \longrightarrow |g(x)-l|<\epsilon)$. Since $\lim_{x\to a}f(x)=b$ then there is $\delta '>0$ such that $\forall x\in A(0<|x-a|<\delta '\longrightarrow |f(x)-b|<\delta)$. But then $\forall x\in A(0<|x-a|<\delta '\longrightarrow |g(f(x))-l|<\epsilon)$. This means that $\lim_{x\to a}(g\circ f)(x)$ exists and equals $l$.


The issue here is that you have no guarantee that $g$ is continuous.

The problem in the proof itself is that while it may be true that $\forall x \in A(0 < |x - a| < \delta' \rightarrow |f(x) - b| < \delta)$, it is not necessarily true that $\forall x \in A(0 < |x - a| < \delta' \rightarrow 0 < |f(x) - b| < \delta)$, and if $f(x) = b$ so that $|f(x) - b| = 0$, then this cannot then be used as an input to $g$.

However, if $g$ is continuous at $b$, then it is true that $g(b) = l$ (by definition of continuity), and so $|g(b) - l| = 0 < \epsilon$ for all $\epsilon > 0$.

Thus, it is no longer needed that $0 < |x - b| < \delta$ for $|g(b) - l| < \epsilon$, and instead, it will suffice to require that $|x - b| < \delta$.

This then allows the remainder of your proof to work.

Edit: An alternate sufficient condition would be to require that $\exists \delta_1 > 0$ such that $\forall x \in A(0 < |x - a| < \delta_1 \rightarrow 0 < |f(x) - b|$.

Then, simply take $\min(\delta_1, \delta')$ to be the new value of $\delta'$ used in the proof.

  • $\begingroup$ This a very important technical detail which I am sure many book authors have missed. Thanks for clarifying it here. $\endgroup$ – Paramanand Singh Nov 17 '13 at 5:03

Suppose that $g$ is not continuous at $b$, so that $l \neq g(b)$, and suppose that for any choice of $\varepsilon$, is some $x^\ast_\varepsilon$ satisfying $0 < |x^\ast_\varepsilon - a| < \delta'(\varepsilon)$ and $f(x^\ast_\varepsilon) = b$ (this can happen, for example, if $f$ is the constant function $f(x) \equiv b$). If both of these things happen, then $$|g(f(x^\ast_\varepsilon)) - l| = |g(b) - l| > 0.$$ It then follows that if we choose $\varepsilon < |g(b) - l|$, we have $$|g(f(x^\ast_\varepsilon)) - l| = |g(b) - l| > \varepsilon \text{ even though } |x^\ast_\varepsilon - a| < \delta'(\varepsilon).$$ Hence your choice of $\delta'(\varepsilon)$ doesn't work in this scenario.

If you assume that either $g$ is continuous or $f(x) \neq b$ for $x$ close to $a$, then your proof will work.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.