[GRE 1268, #20a]
Let \(f(x)=\ln (1+e^x)\). Find
\(\displaystyle \lim_{x\rightarrow 0} \frac{f(f(x))-f(\ln 2)}{x} \).
Solution
If we try to do the limit by just plugging in \(x=0\), we find \(f(0)=\ln(1+e^0)=\ln(1+1)=\ln 2\), and so
\(f(f(0))= f(\ln 2)\). This means that the numerator is \(f(\ln 2) - f(\ln 2) = 0\), and the limit is of form \(0/0\).
So we need L'Hôspital's rule.
Using the Chain Rule, and the fact that \(f(\ln 2)\) is a constant, the derivative of the numerator is.
\[\frac{d}{dx}(f(f(x))-f(\ln 2)) =f'(f(x))f'(x) - 0 = f'(f(x))f'(x).\]
So substituting \(x=0\) we find
\[\left.\frac{d}{dx}\left(f(f(x))-f(\ln 2)\right) \right|_{x=0}=f'(f(0))f'(0)=f'(\ln 2) f'(0).\]
So we need \(f'(0)\) and \(f'(\ln 2)\).
Since \[f'(x) =\frac{e^x}{1+e^x},\]
we find
\[f'(0)=\frac{1}{1+1}=\frac{1}{2}\]
and
\[f'(\ln 2)=\frac{e^{\ln 2}}{1+e^{\ln 2} }=\frac{2}{1+2}=\frac{2}{3}.\]
So
\[\left.\frac{d}{dx}\left(f(f(x))-f(\ln 2)\right)\right|_{x=0}=\frac{2}{3}\cdot \frac{1}{2}=\frac{1}{3}.\]
Since the derivative of the denominator is \(1\), L'Hôspital's rule
gives us
\[\lim_{x\rightarrow 0} \frac{f(f(x))-f(\ln 2)}{x} = \left.\frac{\frac{d}{dx}(f(f(x))-f(\ln 2))}{\frac{d}{dx}x}\right|_{x=0}= \frac{1/3}{1}=\frac{1}{3}.\]