The chain rule opens the way to understanding derivatives of more complicated function. Not only compositions of known functions as we have seen the examples of the previous section, but also functions which are defined implicitly.
Consider the logarithm base \(e\) — \(\log_e(x)\) is the power that \(e\) must be raised to to give \(x\text{.}\) That is, \(\log_e(x)\) is defined by
\begin{align*}
e^{\log_e x} &= x
\end{align*}
i.e. — it is the inverse of the exponential function with base \(e\text{.}\) Since this choice of base works so cleanly and easily with respect to differentiation, this base turns out to be (arguably) the most natural choice for the base of the logarithm. And as we saw in our whirlwind review of logarithms in Section 2.7, it is easy to use logarithms of one base to compute logarithms with another base:
\begin{align*}
\log_q x &= \frac{\log_e x}{\log_e q}
\end{align*}
So we are (relatively) free to choose a base which is convenient for our purposes.
The logarithm with base \(e\text{,}\) is called the “natural logarithm”. The “naturalness” of logarithms base \(e\) is exactly that this choice of base works very nicely in calculus (and so wider mathematics) in ways that other bases do not 1
The interested reader should head to Wikipedia and look up the natural logarithm.
. There are several different “standard” notations for the logarithm base \(e\text{;}\)
\begin{gather*}
\log_e x = \log x = \ln x.
\end{gather*}
We recommend that you be able to recognise all of these.
In this text we will write the natural logarithm as “\(\log\)” with no base. The reason for this choice is that base \(e\) is the standard choice of base for logarithms in mathematics 2
In other disciplines other bases are natural; in computer science, since numbers are stored in binary it makes sense to use the binary logarithm — i.e. base 2. While in some sciences and finance, it makes sense to use the decimal logarithm — i.e. base 10.
And finally we should remember that \(\log x\) has domain (i.e. is defined for) \(x \gt 0\) and range (i.e. takes all of the values in) the set of all real numbers.
This doesn’t look good. But all is not lost — we have the chain rule, and we know that the logarithm satisfies the equation:
\begin{align*}
x &= e^{\log x}
\end{align*}
Since both sides of the equation are the same function, both sides of the equation have the same derivative. i.e. we are using 4
Notice that just because the derivatives are the same, doesn’t mean the original functions are the same. Both \(f(x)=x^2\) and \(g(x)=x^2+3\) have derivative \(f'(x)=g'(x)=2x\text{,}\) but \(f(x)
\neq g(x)\text{.}\)
If \(x\lt 0\) then \(|x|= -x\text{.}\) If \(|h|\) is strictly smaller than \(|x|\text{,}\) then we also have that \(x+h\lt 0\) and \(|x+h|=-(x+h)=|x|-h\text{.}\) Write \(X=|x|\) and \(H=-h\text{.}\) Then, by the definition of the derivative,
Just after Corollary 2.6.17, we said that we would, in the future, find the derivative of \(x^a\) for all real numbers. The future is here. Let \(x\gt 0\) and \(a\) be any real number. Exponentiating both sides of \(\log\big(x^a\big)=a\log x\) gives us \(x^a=e^{a\log x}\) and then
We can extend Theorem 2.10.1 to compute the derivative of logarithms of other bases in a straightforward way. Since for any positive \(a
\neq 1\text{:}\)
\begin{align*}
\log_a x &= \frac{\log x}{\log a} = \frac{1}{\log a} \cdot \log x &
\text{since $a$ is a constant}\\
\diff{}{x} \log_a x &= \frac{1}{\log a} \cdot \frac{1}{x}
\end{align*}
Recall that we need the caveat \(a \neq 1\) because the logarithm base 1 is not well defined. This is because \(1^x = 1\) for any \(x\text{.}\) We do not need a similar caveat for the derivative of the exponential because we know (recall Example 2.7.1)
Notice that the product of functions on the right-hand side has become a sum of functions. Differentiating sums is much easier than differentiating products. So when we differentiate we have
This same trick of “take a logarithm and then differentiate” — or logarithmic differentiation — will work any time you have a product (or ratio) of functions.
Beware however, that we may only take the logarithm of positive numbers, and this \(f(x)\) is often negative. For example, if \(1 \lt x \lt 2 \text{,}\) the factor \((1-x^2)\) in the definition of \(f(x)\) is negative while all of the other factors are positive, so that \(f(x)\lt 0 \text{.}\) None–the–less, we can use logarithmic differentiation to find \(f'(x)\text{,}\) by exploiting the observation that \(\diff{}{x}\log|f(x)|=\frac{f'(x)}{f(x)}\text{.}\) (To see this, use the chain rule and Example 2.10.4.) So we take the logarithm of \(|f(x)|\) and expand.
Let \(f(x)\) be a function whose range includes only positive numbers. Show that the curves \(y=f(x)\) and \(y=\log(f(x))\) have horizontal tangent lines at the same values of \(x\text{.}\)