Skip to main content

Section 2.13 Derivative of logarithmic functions

Subsection Derivative of inverse functions

To derive a derivative formula for the logarithmic functions, we make use once again of the fact that they are, by definition, the inverses of exponential functions. Surely there is a relationship between the derivative of an invertible function \(f\) and its inverse \(f^{-1}\text{,}\) right? Of course! And the relationship is revealed by the chain rule.
Assume \(f\) is invertible. We will start with the inverse function identity \(f(f^{-1}(x))=x\) and take the derivative of both sides:
\begin{align*} f(f^{-1}(x)) \amp = x\\ \frac{d}{dx} f(f^{-1}(x)) \amp = \frac{d}{dx} x\\ f'(f^{-1}(x))\cdot (f^{-1})'(x) \amp = 1\\ (f^{-1})'(x) \amp =\frac{1}{f'(f^{-1}(x))}\text{.} \end{align*}
Amazing! We have just derived a formula for \(f^{-1}\) using nothing but the chain rule and the defining property of being an inverse. If you look closely, however, you will see there are two hidden assumptions in our argument. For one thing, for the last line of our derivation to make sense, we need \(f'(f^{-1}(x))\ne 0\text{.}\) This is not too difficult to deal with: we simply assume that \(f'\) is nonzero on its domain in order to apply the formula. The deeper issue at play is that in order to use th chain rule in the first place, we must assume \(f^{-1}\) is differentiable! It turns out that this condition is automatic as long as \(f\) is differentiable and \(f'\) is nonzero, though the proof of this fact is quite subtle, and will not be given here. We will, however, acknowledge this fact as its own important result in our theorem below.
We will very soon use TheoremΒ 2.13.1 to derive a formula for the derivative of logarithmic functions. However, the inverse derivative formula is very useful in its own right, and indeed, we will come back to it when discussing inverse trigonometric functions. Accordingly, we provide a procedure for applying the inverse derivative formula in general. Since the roles of input and output are somewhat fluid when going back and forth between a function \(f\) and its inverse \(f^{-1}\text{,}\) we will use the β€œinput/output neutral” variable names \(r\) and \(s\text{.}\)

Example 2.13.3. Derivative of inverse.

Let \(f\) be defined as \(f(x)=x^5+x^3+3x-5\) on the domain \(\R\) of all real numbers.
  1. Show that \(f\) is invertible.
  2. Plot three points on the graph of \(f^{-1}\text{.}\)
  3. Compute \((f^{-1})'(-5)\) and \((f^{-1})'(-10)\text{.}\)
Solution.
  1. Since \(f'(x)=5x^4+3x^2+3\) is clearly positive for all \(x\in \R\text{,}\) we see that \(f\) is increasing on its domain, and hence is one-to-one. Thus \(f\) has an inverse function.
  2. Short of actually plotting points, we can at least produce a table of values for \(f^{-1}\) using a table of values of \(f\text{,}\) using (4) of TheoremΒ 2.10.25.
    \begin{align*} \begin{array}{c|c} x\amp f(x) \\ \hline -1\amp -10\\ 0 \amp -5 \\ 1 \amp -2 \end{array} \amp \iff \begin{array}{c|c} x\amp f^{-1}(x) \\ \hline -10\amp -1\\ -5 \amp 0 \\ -2\amp 1 \end{array} \end{align*}
    By plotting such points, and others with the help of technology, we are able to produce a detailed graph of \(f^{-1}\) even in the absence of an explicit formula. See FigureΒ 2.13.4.
  3. For \(r\) in the domain of \(f^{-1}\text{,}\) we have by TheoremΒ 2.13.1
    \begin{align*} (f^{-1})'(r) \amp = \frac{1}{f'(f^{-1}(r))}\text{.} \end{align*}
    Since furthermore, \(f'(x)=5x^4+3x^2+3\text{,}\) we conclude that
    \begin{align*} (f^{-1})'(r) \amp = \frac{1}{5(f^{-1}(r))^4+3(f^{-1}(r))^2+3} \end{align*}
    for general \(r\text{.}\)
    Finally, to compute \((f^{-1})'(-5)\) and \((f^{-1})'(-10)\text{,}\) it remains only to compute \(f^{-1}(-5)\) and \(f^{-1}(-10)\) and plug these into the last expression above. We see using our table of values in (b) that \(f^{-1}(-5)=0\) and \(f^{-1}(-10)=-1\text{.}\) Thus
    \begin{align*} (f^{-1})'(-5) \amp = \frac{1}{(5\cdot 0+3\cdot 0+3)}=\frac{1}{3} \\ (f^{-1})'(-10) \amp = \frac{1}{(5\cdot (-1)^4+3\cdot (-1)^2+3)}=\frac{1}{11} \text{.} \end{align*}
Graph of quintic polynomial and its inverse
Figure 2.13.4. Graph of \(f(x)=x^5+x^3+3x-5\) and its inverse \(f^{-1}\)

Subsection Derivative formula for logarithmic functions

With the general inverse derivative formula in hand, it is no bother at all to produce derivative formulas for logarithmic functions. We will use this most often for the natural logarithm \(\ln\text{.}\) Setting \(f(x)=e^x\) and \(f^{-1}(x)=\ln x\text{,}\) (2.45) becomes
\begin{align*} \frac{d}{dx} \ln x \amp =\frac{1}{f'(\ln x)}\text{.} \end{align*}
Since \(f(x)=e^x\text{,}\) we have \(f'(x)=e^x\text{,}\) and thus
\begin{align*} \frac{d}{dx}\ln x \amp = \frac{1}{e^{\ln x}} \\ \amp =\frac{1}{x} \amp (e^{\ln x}=x)\text{.} \end{align*}
This is a somewhat surprising result. Whereas the natural logarithm is quite a complicated function (in fact, a transcendental one), its derivative \(1/x\) is a rational function! Interpreting the derivative as the slope of the tangent line, the fact that \(f'(x)=1/x\) for \(f(x)=\ln x\) is a precise quantitative description of the fact that the slop of the graph of \(f(x)=\ln x\) decreases as \(x\) increases. Indeed, since \(1/x\to 0\) as \(x\to \infty\text{,}\) we can say in fact that the slope of \(\ln x\) approaches zero as \(x\to \infty\text{.}\)
In making official our derivative formula for \(\ln x\text{,}\) we will generalize it slightly to the function \(g(x)=\ln \abs{x}\text{.}\) Note the difference: whereas the domain of \(\ln x\) is \((0,\infty)\text{,}\) the domain of \(g(x)=\ln \abs{x}\) is \(\R-\{0\}\text{.}\)
Graph of natural logarithm
(a) \(f(x)=\ln x\)
Graph of natural logarithm of absolute value
(b) \(g(x)=\ln \abs{x}\)
Figure 2.13.5. Graphs of \(f(x)=\ln x\) and \(g(x)=\ln \abs{x}\)
We claim that, as with \(\ln x\text{,}\) we have more generally
\begin{align*} \frac{d}{dx}\ln \abs{x} \amp =\frac{1}{x} \end{align*}
for all \(x\ne 0\text{.}\) To see why, note that if \(x> 0\text{,}\) then \(\ln\abs{x}=\ln x\text{,}\) and our formula above applie. And if \(x< 0\text{,}\) we have \(\abs{x}=-x\text{,}\) in which case an application of the chain rule tells us that
\begin{align*} \frac{d}{dx}\ln \abs{x} \amp = \frac{d}{dx}(\ln(-x)) \amp (x< 0) \\ \amp = \frac{1}{-x}\cdot (-x)' \\ \amp = \frac{1}{-x}\cdot (-1)\\ \amp =\frac{1}{x}\text{.} \end{align*}

Example 2.13.7. Derivative of natural logarithm.

Compute the derivative of the given function.
  1. \(\displaystyle f(x)=\ln(\ln{x})\)
  2. \(\displaystyle g(t)=\ln(\sqrt[3]{t})\)
  3. \(q(u)=\ln(k u)\text{,}\) \(k\) a positive constant.
  4. \(\displaystyle h(s)=e^{s^2}\ln \sqrt{s}\)
Solution.
  1. We compute
    \begin{align} f'(x) \amp =\frac{1}{\ln x}\cdot (\ln x)'\tag{2.48}\\ \amp = \frac{1}{\ln x}\cdot \frac{1}{x}\tag{2.49}\\ \amp = \frac{1}{x\ln x}\text{.}\tag{2.50} \end{align}
  2. We will do this two ways. The first uses the chain rule:
    \begin{align*} g'(t) \amp =\frac{d}{dt}\ln(t^{1/3})\\ \amp = \frac{1}{t^{1/3}}\cdot (t^{1/3})'\\ \amp = \frac{1}{t^{1/3}}\cdot \frac{1}{3t^{2/3}}\\ \amp = \frac{1}{3t}\text{.} \end{align*}
    The expression at the end is surprisingly simple, until you realize that we could have just as well used some logarithmic properties to avoid the chain rule altogether:
    \begin{align*} \frac{d}{dt}g(t) \amp = \frac{d}{dt} \ln t^{1/3}\\ \amp = \frac{d}{dt} \left(\frac{1}{3}\ln t\right) \amp (\ln a^b=b\ln a)\\ \amp = \frac{1}{3}\cdot \frac{1}{t}\\ \amp = \frac{1}{3t}\text{.} \end{align*}
    Moral: as usual, keep an eye out for potential shortcuts through algebraic simplification!
  3. Heeding the advice directly above, we avoid the chain rule by using logarithmic properties:
    \begin{align*} \frac{d}{du} q(u) = \frac{d}{du}(\ln(ku)) \\ \amp =\frac{d}{du}(\ln k+\ln u) \amp (\ln(ab)=\ln a+\ln b) \amp \\ \amp = 0+ \frac{1}{u} \amp (\ln k \text{ a constant})\\ \amp =\frac{1}{u}\text{.} \end{align*}
  4. We compute
    \begin{align*} h'(s) \amp = \left(e^{s^2}\right)'\ln(\sqrt{s}) + e^{s^2}\cdot \frac{d}{ds}\ln(s^{1/2}) \amp \\ \amp = 2s e^{s^2}\ln(\sqrt{s}) + e^{s^2}\cdot \frac{1}{s^{1/2}}\cdot (s^{1/2})' \\ \amp = 2s e^{s^2}\ln(\sqrt{s}) + e^{s^2}\cdot \frac{1}{s^{1/2}}\cdot \frac{1}{2}s^{-1/2}\\ \amp = 2s e^{s^2}\ln(\sqrt{s}) + \frac{e^{s^2}}{2s} \text{.} \end{align*}
We could produce a derivative formula for general logarithmic functions \(\log_b\) proceeding exactly as above, by identifying \(\log_b\) as the inverse function of \(f(x)=b^x\text{.}\) Instead, we put our change of base formula to work to come up with a quicker derivation. Given any \(b> 0\text{,}\) we have
\begin{align*} \log_b(x) \amp =\frac{\log_e x}{\log_e b} \amp \knowl{./knowl/xref/eq_log_change_base.html}{\text{(2.39)}} \\ \amp =\frac{\ln x}{\ln b}\text{,} \end{align*}
from whence it follows that
\begin{align*} \frac{d}{dx}\log_b x \amp = \frac{d}{dx}\left(\frac{\ln x}{\ln b}\right) \\ \amp = \frac{1}{\ln b}\cdot \frac{d}{dx}(\ln x) \\ \amp = \frac{1}{\ln b}\cdot \frac{1}{x} \\ \amp = \frac{1}{x\ln b}\text{.} \end{align*}

Example 2.13.9. General logarithm derivatives.

Compute the derivative of the given function.
  1. \(\displaystyle f(x)=\log_7(49x^2)\)
  2. \(\displaystyle g(t)=\ln(\log_2(t^3+1))\)
Solution.
  1. We compute
    \begin{align*} f'(x) \amp =(\log_7 49+\log_7 x^2)' \amp (\log_7 ab=\log_7 a+\log_7b)\\ \amp = (2+2\log_7 x)' \amp (49=7^2, \log_7 a^c=c\log_7 a)\\ \amp = 0 + 2(\log_7 x)'\\ \amp = 2\cdot \frac{1}{x\ln 7} \\ \amp = \frac{2}{x\ln 7}\text{.} \end{align*}
  2. We compute
    \begin{align*} g'(t) \amp = \frac{1}{\log_2(t^3+1)}\cdot (\log_2(t^3+1))' \\ \amp = \frac{1}{\log_2(t^3+1)}\cdot \frac{1}{(t^3+1)\ln 2}\cdot (t^3+1)' \\ \amp = \frac{1}{\log_2(t^3+1)}\cdot \frac{1}{(t^3+1)\ln 2}\cdot 3t^2 \\ \amp = \frac{3t^2}{\ln(2)(t^3+1)\log_2(t^3+1)} \text{.} \end{align*}

Exercises Exercises

1.
Let \((x_0, y_0) = (3, 3)\) and \((x_1, y_1) = (3.1, 3.4)\text{.}\) Use the following graph of the function \(f\) to find the indicated derivatives.
If \(h(x)=(f(x))^{2}\text{,}\) then
\(h'(3) =\)
If \(g(x)=f^{-1}(x)\text{,}\) then
\(g'(3) =\)
Answer 1.
\(\frac{2\cdot 3^{2-1}\mathopen{}\left(3.4-3\right)}{3.1-3}\)
Answer 2.
\(\frac{3.1-3}{3.4-3}\)
Solution.
\((3,3)\)\(f(3)=3\text{.}\)\((3.1,3.4)\)
\begin{equation*} \hbox{Slope of tangent} = \frac{3.4-3}{3.1-3} = \frac{0.4}{0.1} = 4. \end{equation*}
\(f'(3)=4\text{.}\)
\begin{equation*} h'(3) = 2(f(3))\cdot f'(3) =2\cdot 3\cdot 4 = 24. \end{equation*}
\(g(x)\)\(f\text{,}\)\(g(3) = 3\text{.}\)\(f(g(x)) = f(f^{-1}(x)) = x\text{,}\)\(f(g(x)) = x\text{.}\)\(f'(g(x))\cdot g'(x) = 1\text{,}\)\(g'(x) = \frac{1}{f'(g(x))}\text{.}\)\(g'(3) = \frac{1}{f'(g(3))} = \frac{1}{f'(3)} = \frac1{4}\text{.}\)
3.
For each of the given functions \(f(x)\text{,}\) find the derivative \(\left(f^{-1}\right)'(c)\) at the given point \(c\text{,}\) first finding \(a=f^{-1}(c)\text{.}\)
a) \(f(x)= 3 x + 8 x^{21}\text{;}\) \(c = -11\)
\(a\) =
\(\left(f^{-1}\right)'(c)\) =
b) \(f(x)= x^2 - 8 x + 25\) on the interval \([4,\infty)\text{;}\) \(c = 10\)
\(a\) =
\(\left(f^{-1}\right)'(c)\) =
Answer 1.
Answer 2.
\(0.00584795321637427\)
Answer 3.
Answer 4.
4.
Given that \(f(x)=2x+\cos(x)\) is one-to-one, use the formula
\begin{equation*} \displaystyle (f^{-1})'(x)=\frac{1}{f'(f^{-1}(x))} \end{equation*}
to find \((f^{-1})'(1)\text{.}\)
\((f^{-1})'(1) =\)
Answer.