There is still one more “rule” that we need to complete our toolbox and that is the chain rule. However before we get there, we will add a few functions to our list of things we can differentiate 2
One reason we add these functions is that they interact very nicely with the derivative. Another reason is that they turn up in many “real world” examples.
Let \(a \gt 0\) and set \(f(x) = a^x\) — this is what is known as an exponential function. Let’s see what happens when we try to compute the derivative of this function just using the definition of the derivative.
Unfortunately we cannot complete this computation because we cannot evaluate the last limit directly. For the moment, let us assume this limit exists and name it
It depends only on \(a\) and is completely independent of \(x\text{.}\) Using this notation (which we will quickly improve upon below), our desired derivative is now
Thus the derivative of \(a^x\) is \(a^x\) multiplied by some constant — i.e. the function \(a^x\) is nearly unchanged by differentiating. If we can tune \(a\) so that \(C(a) = 1\) then the derivative would just be the original function! This turns out to be very useful.
To try finding an \(a\) that obeys \(C(a)=1\text{,}\) let us investigate how \(C(a)\) changes with \(a\text{.}\) Unfortunately (though this fact is not at all obvious) there is no way to write \(C(a)\) as a finite combination of any of the functions we have examined so far 3
To a bit more be precise, we say that a number \(q\) is algebraic if we can write \(q\) as the zero of a polynomial with integer coefficients. When \(a\) is any positive algebraic number other than \(1\text{,}\)\(C(a)\) is not algebraic. A number that is not algebraic is called transcendental. The best known example of a transcendental number is \(\pi\) (which follows from the Lindemann-Weierstrass Theorem — way beyond the scope of this course).
. To get started, we’ll try to guess \(C(a)\text{,}\) for a few values of \(a\text{,}\) by plugging in some small values of \(h\text{.}\)
Let \(a =1\) then \(C(1) = \ds \lim_{h \to 0} \frac{1^h-1}{h} = 0\text{.}\) This is not surprising since \(1^x=1\) is constant, and so its derivative must be zero everywhere. Let \(a =2\) then \(C(2) = \ds \lim_{h \to 0} \frac{2^h-1}{h}\text{.}\) Setting \(h\) to smaller and smaller numbers gives
From this example it appears that \(C(a)\) increases as we increase \(a\text{,}\) and that \(C(a) = 1\) for some value of \(a\) between \(2\) and \(3\text{.}\)
We can learn a lot more about \(C(a)\text{,}\) and, in particular, confirm the guesses that we made in the last example, by making use of logarithms — this would be a good time for you to review them.
Before you read much further into this little review on logarithms, you should first go back and take a look at the review of inverse functions in Section 0.6.
We are about to define the “logarithm with base \(q\)”. In principle, \(q\) is allowed to be any strictly positive real number, except \(q=1\text{.}\) However we shall restrict our attention to \(q \gt 1\text{,}\) because, in practice, the only \(q\)’s that are ever used are \(e\) (a number that we shall define in the next few pages), \(10\) and, if you are a computer scientist, \(2\text{.}\) So, fix any \(q \gt 1\) (if you like, pretend that \(q=10\)). The function \(f(x)=q^x\)
increases as \(x\) increases (for example if \(x' \gt x\text{,}\) then \(10^{x'} = 10^x \cdot 10^{x'-x} \gt 10^x\) since \(10^{x'-x} \gt 1\))
Consequently, for any \(0 \lt Y \lt \infty\text{,}\) the horizontal straight line \(y=Y\) crosses the graph of \(y=f(x)=q^x\) at exactly one point, as illustrated in the figure below.
The \(x\)–coordinate of that intersection point, denoted \(X\) in the figure, is \(\log_q(Y)\text{.}\) So \(\log_q(Y)\) is the power to which you have to raise \(q\) to get \(Y\text{.}\) It is the inverse function of \(f(x)=q^x\text{.}\) Of course we are free to rename the dummy variables \(X\) and \(Y\text{.}\) If, for example, we wish to graph our logarithm function, it is natural to rename \(Y\rightarrow x\) and \(X\rightarrow y\text{,}\) giving
Let \(q \gt 1\text{.}\) Then the logarithm with base \(q\) is defined 4
We can also define logarithms with base \(0 \lt r \lt 1\) but doing so is not necessary. To see this, set \(q=1/r \gt 1\text{.}\) Then it is reasonable to define \(\log_r(x) = - \log_q(x)\) since
Can we convert from logarithms in one base to logarithms in another? For example, if our calculator computes logarithms base 10 for us (which it very likely does), can we also use it to compute a logarithm base \(q\text{?}\) Yes, using
We can estimate the correct value of \(a\) by using our numerical estimate of \(C(10)\) above. The way to do this is to first rewrite \(C(a)\) in terms of logarithms.
\begin{align*}
a&= 10^{\log_{10} a} & \text{ and so }&& a^h &= 10^{h\log_{10} a}.
\end{align*}
Remember that we are trying to find an \(a\) with \(C(a)=1\text{.}\) We can do so by recognising that \(C(a)=C(10)\,(\log_{10}a)\) has the following properties.
When \(a=1\text{,}\)\(\log_{10}(a) = \log_{10} 1 =0\) so that \(C(a) = C(10) \log_{10}(a) = 0\text{.}\) Of course, we should have expected this, because when \(a=1\) we have \(a^x = 1^x = 1\) which is just the constant function and \(\diff{}{x} 1 = 0\text{.}\)
Hence the graph of \(C(a)\) passes through \((1,0)\text{,}\) is always increasing as \(a\) increases and goes off to \(+\infty\) as \(a\) goes off to \(+\infty\text{.}\) See Figure 2.7.3. Consequently 5
We are applying the Intermediate Value Theorem here, but we have neglected to verify the hypothesis that \(\log_{10} (a)\) is a continuous function. Please forgive us — we could do this if we really had to, but it would make a big mess without adding much understanding, if we were to do so here in the text. Better to just trust us on this.
there is exactly one value of \(a\) for which \(C(a) = 1\text{.}\)
The value of \(a\) for which \(C(a)=1\) is given the name \(e\text{.}\) It is called Euler’s constant 6
Unfortunately there is another Euler’s constant, \(\gamma\text{,}\) which is more properly called the Euler–Mascheroni constant. Anyway like many mathematical discoveries, \(e\) was first found by someone else — Napier used the constant \(e\) in order to compute logarithms but only implicitly. Bernoulli was probably the first to approximate it when examining continuous compound interest. It first appeared explicitly in work of Leibniz, though he denoted it \(b\text{.}\) It was Euler, though, who established the notation we now use and who showed how important the constant is to mathematics.
. In Example 2.7.1, we estimated \(C(10)\approx 2.3026\text{.}\) So if we assume \(C(a)=1\) then the above equation becomes
\begin{align*}
2.3026 \cdot \log_{10} a &\approx 1\\
\log_{10} a &\approx \frac{1}{2.3026} \approx 0.4343\\
a &\approx 10^{0.4343} \approx 2.7813
\end{align*}
This gives us the estimate \(a \approx 2.7813\) which is not too bad. In fact 7
Recall \(n\) factorial, written \(n!\) is the product \(n\times(n-1)\times(n-2)\times\cdots\times2\times1\text{.}\)
The function \(e^x\) is of course the special case of the function \(a^x\) with \(a = e\text{.}\) So it inherits all the usual algebraic properties of \(a^x\text{.}\)
Now consider again the problem of differentiating \(a^x\text{.}\) We saw above that
\begin{align*}
\diff{}{x} a^x &= C(a) \cdot a^x \qquad\text{ and }\qquad
C(a) = C(10) \cdot \log_{10} a \\
\amp\text{ which gives }
\diff{}{x} a^x = C(10)\cdot \log_{10} a \cdot a^x
\end{align*}
We can eliminate the \(C(10)\) term with a little care. Since we know that \(\diff{}{x} e^x = e^x\text{,}\) we have \(C(e)=1\text{.}\) This allows us to express
\begin{align*}
1 = C(e) &= C(10) \cdot \log_{10} e & \text{ and so}\\
C(10) &= \frac{1}{\log_{10} e}
\end{align*}
In order to compute this derivative we need to know how to differentiate
\begin{gather*}
\diff{}{x} g( q x)
\end{gather*}
where \(q\) is a constant. We’ll hold off on learning this for the moment until we have introduced the chain rule (see Section 2.9 and in particular Corollary 2.9.9). Similarly we’d like to know how to differentiate logarithms — again this has to wait until we have learned the chain rule.
\begin{align*}
\diff{}{x} x^n &= n x^{n-1} & \text{ and }&&
\diff{}{x} e^x &= e^x
\end{align*}
are either nearly unchanged or actually unchanged by differentiating. It turns out that some of the trigonometric functions also have this property of being “nearly unchanged” by differentiation. That brings us to the next section.
The graph below shows an exponential function \(f(x)=a^x\) and its derivative \(f'(x)\text{.}\) Choose all the options that describe the constant \(a\text{.}\)
\begin{align*}
\amp (a)\;\; a \lt 0\amp
\amp (b)\;\;a \gt 0\amp
\amp (c)\;\;a \lt 1\\
\amp (d)\;\;a \gt 1\amp
\amp (e)\;\; a \lt e\amp
\amp(f)\;\; a \gt e
\end{align*}
A population of bacteria is described by \(P(t)=100e^{0.2t}\text{,}\) for \(0 \leq t \leq 10\text{.}\) Over this time period, is the population increasing or decreasing?
Functions of the form \(g(x)\) are relatively common. If you remember this formula, you can save yourself some time when you need to differentiate them. We will explore this more in Question 2.14.2.19, Section 2.14.