Skip to main content

CLP-1 Differential Calculus

Section 2.7 Derivatives of Exponential Functions

Now that we understand how derivatives interact with products and quotients, we are able to compute derivatives of
  • polynomials,
  • rational functions, and
  • powers and roots of rational functions.
Notice that all of the above come from knowing  1  the derivative of \(x^n\) and applying linearity of derivatives and the product rule.
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 . The first of these is the exponential function.
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.
\begin{align*} \diff{f}{x} &= \lim_{h \to 0} \frac{f(x+h) - f(x)}{h} = \lim_{h \to 0} \frac{a^{x+h} - a^x}{h}\\ &= \lim_{h \to 0} a^x \cdot \frac{a^{h} - 1}{h} = a^x \cdot \lim_{h \to 0} \frac{a^{h} - 1}{h} \end{align*}
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
\begin{align*} C(a) &= \lim_{h \to 0} \frac{a^{h} - 1}{h} \end{align*}
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
\begin{align*} \diff{}{x}a^x &= C(a)\cdot a^x. \end{align*}
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 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
\(h\) 0.1 0.01 0.001 0.0001 0.00001 0.000001 0.0000001
\(\tfrac{2^h-1}{h}\) 0.7177 0.6956 0.6934 0.6932 0.6931 0.6931 0.6931
Similarly when \(a=3\) we get
\(h\) 0.1 0.01 0.001 0.0001 0.00001 0.000001 0.0000001
\(\tfrac{3^h-1}{h}\) 1.1612 1.1047 1.0992 1.0987 1.0986 1.0986 1.0986
and \(a=10\)
\(h\) 0.1 0.01 0.001 0.0001 0.00001 0.000001 0.0000001
\(\tfrac{10^h-1}{h}\) 2.5893 2.3293 2.3052 2.3028 2.3026 2.3026 2.3026
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.

Subsection 2.7.1 Whirlwind Review of Logarithms

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.

Subsubsection 2.7.1.1 Logarithmic Functions

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\))
  • obeys \(\lim\limits_{x\rightarrow-\infty} q^x=0\) (for example \(10^{-1000}\) is really small) and
  • obeys \(\lim\limits_{x\rightarrow+\infty} q^x=+\infty\) (for example \(10^{+1000}\) is really big).
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
Definition 2.7.2.
Let \(q \gt 1\text{.}\) Then the logarithm with base \(q\) is defined  4  by
\begin{align*} y=\log_q(x) & \liff x=q^y \end{align*}
Obviously the power to which we have to raise \(q\) to get \(q^x\) is \(x\text{,}\) so we have both
\begin{align*} \log_q( q^x ) &=x & q^{\log_q(x)} &=x \end{align*}
From the exponential properties
\begin{align*} q^{log_q(xy)} &= xy &&= q^{log_q(x)} q^{log_q(y)} = q^{log_q(x)+log_q(y)}\\ q^{log_q(x/y)} &= x/y&&= q^{log_q(x)} / q^{log_q(y)} = q^{log_q(x)-log_q(y)}\\ q^{log_q(x^r)} &= x^r &&= \big(q^{log_q(x)}\big)^r = q^{r log_q(x)} \end{align*}
we have
\begin{align*} \log_q(xy) &= \log_q(x) + \log_q(y)\\ \log_q(x/y) &= \log_q(x) - \log_q(y)\\ \log_q( x^r ) &= r \log_q (x) \end{align*}
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
\begin{align*} \log_q(x) &= \frac{\log_{10} x}{\log_{10} q} \end{align*}
How did we get this? Well, let's start with a number \(x\) and suppose that we want to compute
\begin{align*} y &= \log_q x\\ \end{align*}

We can rearrange this by exponentiating both sides

\begin{align*} q^y &= q^{\log_q x} = x\\ \end{align*}

Now take log base 10 of both sides

\begin{align*} \log_{10} q^y &= \log_{10} x\\ \end{align*}

But recall that \(\log_q( x^r ) = r \log_q(x)\text{,}\) so

\begin{align*} y \log_{10} q &= \log_{10} x\\ y &= \frac{\log_{10} x}{\log_{10} q} \end{align*}

Subsection 2.7.2 Back to that Limit

Recall that we are trying to choose \(a\) so that
\begin{align*} \lim_{h\to0} \frac{a^h-1}{h} &= C(a) = 1. \end{align*}
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*}
Using this we rewrite \(C(a)\) as
\begin{align*} C(a) &= \lim_{h\to0} \frac{1}{h} \left( 10^{h\log_{10} a}-1 \right)\\ \end{align*}

Now set \(H = h\log_{10}(a)\text{,}\) and notice that as \(h\to 0\) we also have \(H \to 0\)

\begin{align*} &= \lim_{H \to 0} \frac{\log_{10} a}{H} \left(10^H-1\right)\\ &= \log_{10} a \cdot \lim_{H \to 0} \frac{10^H-1}{H}\\ &= \log_{10} a \cdot C(10). \end{align*}
Below is a sketch of \(C(a)\) against \(a\text{.}\)
Figure 2.7.3.
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{.}\)
  • \(\log_{10}a\) increases as \(a\) increases, and hence \(C(a)=C(10)\ \log_{10}a\) increases as \(a\) increases.
  • \(\log_{10}a\) tends to \(+\infty\) as \(a\rightarrow\infty\text{,}\) and hence \(C(a)\) tends to \(+\infty\) as \(a\rightarrow\infty\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  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 . 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 
We will be able to explain this last formula once we develop Taylor polynomials later in the course.
To summarise
We plot \(e^x\) in the graph below
And just a reminder of some of its  8  properties…
  1. \(\displaystyle e^0=1\)
  2. \(\displaystyle e^{x+y}=e^xe^y\)
  3. \(\displaystyle e^{-x}=\tfrac{1}{e^x}\)
  4. \(\displaystyle \big(e^x\big)^y=e^{xy}\)
  5. \(\lim\limits_{x\rightarrow\infty}e^x=\infty\text{,}\) \(\lim\limits_{x\rightarrow-\infty}e^x=0\)
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*}
Putting things back together gives
\begin{align*} \diff{}{x} a^x &= \frac{\log_{10} a}{\log_{10} e} \cdot a^x\\ &= \log_e a \cdot a^x. \end{align*}
There is more than one way to get to this result. For example, let \(f(x) = a^x\text{,}\) then
\begin{align*} \log_e f(x) &= x \log_e a\\ f(x) &= e^{ x \log_e a} \end{align*}
So if we write \(g(x) = e^x\) then we are really attempting to differentiate the function
\begin{align*} \diff{f}{x} &= \diff{}{x} g(x \cdot \log_e a). \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.
Notice that the derivatives
\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.

Exercises 2.7.3 Exercises

Exercises — Stage 1 .

1.
Match the curves in the graph to the following functions:
\begin{align*} \amp (a)\;\; y=\left(\frac{1}{2}\right)^x \amp \amp (b)\;\; y=1^x \amp \amp (c)\;\; y=2^x\\ \amp (d)\;\; y=2^{-x} \amp \amp (e)\;\; y=3^x \end{align*}
2.
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*}
3.
True or false: \(\ds\diff{}{x}\{e^x\}=xe^{x-1}\)
4.
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?
We will learn more about the uses of exponential functions to describe real-world phenomena in Section 3.3.

Exercises — Stage 2 .

5.
Find the derivative of \(f(x)=\dfrac{e^{x}}{2x}\) .
6.
Differentiate \(f(x)=e^{2x}\text{.}\)
7.
Differentiate \(f(x)=e^{a+x}\text{,}\) where \(a\) is a constant.
8.
For which values of \(x\) is the function \(f(x)=xe^x\) increasing?
9.
Differentiate \(e^{-x}\text{.}\)
10.
Differentiate \(f(x)=(e^x+1)(e^x-1)\text{.}\)
11.
A particle's position is given by
\begin{equation*} s(t)=t^2e^t. \end{equation*}
When is the particle moving in the negative direction?

Exercises — Stage 3 .

12.
Let \(g(x)=f(x)e^x\text{,}\) for a differentiable function \(f(x)\text{.}\) Give a simplified formula for \(g'(x)\text{.}\)
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.
13.
Which of the following functions describe a straight line?
\begin{align*} \amp (a)\;\;y=e^{3\log x}+1\amp \amp (b)\;\; 2y+5=e^{3+\log x}\amp \amp(c)\;\; y=e^{2x}+4\\ \amp(d)\;\; y=e^{\log x}3^e+\log 2 \end{align*}
14. (✳).
Find constants \(a\text{,}\) \(b\) so that the following function is differentiable:
\begin{equation*} f(x) =\left\{\begin{array}{ll} ax^2 + b & x \le 1\\ e^x & x \gt 1\end{array}\right. \end{equation*}
Differentiating powers and roots of functions is actually quite a bit easier once one knows the chain rule — which we will discuss soon.
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.
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).
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
\begin{equation*} r^{\log_r(x)} = \left(\frac{1}{q}\right)^{\log_r(x)} = \left(\frac{1}{q}\right)^{-\log_q(x)} = q^{\log_q(x)} = x \end{equation*}
as required.
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.
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.
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{.}\)