When I read about the proof of chain rule of differentiation in a real analysis book
$(g\circ f)'(x_0)= \lim\limits_{x \to x_0}\frac{g(f(x))-g(f(x_0))}{x-x_0}$ $=\lim\limits_{x \to x_0}\frac{g(f(x))-g(f(x_0))}{f(x)-f(x_0)}.\frac{f(x)-f(x_0)}{x-x_0}$
They don't explain the case $f(x)=f(x_0)$.
I know the reason that this proof works only when $f(x)\neq f(x_0)$. But to prove the case of $f(x)=f(x_0)$, how we find some $\delta$ such that $f(x)\neq f(x_0)$ $\forall x\in N'_{\delta}x_0$.What is the rigorous proof for it?
Can we prove this rule if $f(x)$ is a constant function $\forall x \in D(f)$? I think we can't prove the chain rule in this case because then $f(x)$ has only one value and it can't be in $D(g)$?
[Edit]- After reading all the answers, I have also tried to do it in new way. Please check it if any step is wrong.
As f is differentiable at $x_0$. $\forall \delta_2>0, \exists\delta_1>0$ s.t. $\forall x \in |x-x_0|<\delta_1 \implies |\frac{f(x)-f(x_0)}{x-x_0}|<\delta_2$ Also $g(u)$ is differentiable at $g(f(x_0))$. So $\forall \epsilon>0, \forall u \in |u-f(x_0)|<\delta_2\delta_1 \implies |\frac{g(u)-g(f(x_0)}{u-f(x_0)}|<\epsilon/\delta_2$ $\exists \delta_3>0$ s.t $\forall x \in |x-x_0|<\delta_3, f(x) \in D(g).$ Now take $\delta = min{\delta_1,\delta_3}$ $\forall x \in |x-x_0|<\delta \implies f(x)\in D(g)$ and $|f(x)-f(x_0)|<\delta_2 |x-x_0|$ $\implies x \in D(g \circ f) and |\frac{g(f(x))-g(f(x_0))}{f(x)-f(x_0)}|<\epsilon/\delta_2$ $\implies |\frac{g(f(x))-g(f(x_0))}{x-x_0}|<\epsilon$
So, $g(f(x))$ is differentiable at $x_0$. Now we can use the highlighted proof in the post without concerning division by zero to find the value of $(g \circ f)'(x)$?
The proof does definitely not work. As you say, if $f$ is constant, then you have $f(x) - f(x_0) = 0$ for all $x$. But even if $f$ is not constant you may have $f(x_n) - f(x_0) = 0$ for suitable sequences $(x_n)$ in $D(f) \setminus \{x_0\}$ such that $x_n \to x_0$. An example is $f(x) = x^2\sin(1/x)$ for $x \ne 0$, $f(0) = 0$. In that case $f(1/n\pi) = 0 = f(0)$ for all $n$.
For a correct proof you should consult another textbook.