# Exponential and Logarithmic Functions

In this page, we will investigate the differentiation of *exponential* and *logarithmic* functions. For every exponential function, there is a corresponding logarithmic function, and vice versa. You are no doubt familiar with functions that take the form ƒ(*x*) = *x ^{ c}*, in which the variable

*x*is the

*base*and the constant value

*c*is the

*exponent*to which

*x*is raised. Exponential functions take the form ƒ(

*x*) =

*c*. The roles of the variable and the constant value have changed places. The constant value

^{ x}*c*becomes the base, and the variable

*x*is the exponent to which

*c*is raised. The

*inverse*of the exponential function

*y*=

*c*is the logarithmic function

^{ x}*x*= log

*(*

_{c}*y*). Let's look at how we find the derivative of exponential and logarithmic functions. We'll start with exponential function

*e*.

^{ x}##

The exponential function *e*^{ x}

^{ x}

We have seen that exponential functions generally take the form ƒ(*x*) = *c ^{ x}*, where

*c*(the

*base*) is a constant value, and

*x*(the

*exponent*) is a variable. Before we deal with exponential functions generally, we will examine the exponential function

*e*, where

^{ x}*e*is the mathematical constant known as

*Euler's number*. There is no exact value for

*e*because it is an irrational number, but an approximation to fifteen decimal places is 2.718281828459045.

Euler's number is named in honour of the Swiss mathematician and physicist *Leonhard Euler* (1707 - 1783) who first used the letter *e* to identify it. However, the discovery of the number itself is attributed to another Swiss mathematician, *Jacob Bernoulli* (1655-1705). Bernoulli is thought to have found the number whilst working on the solution to a problem involving *compound interest*. You can read more about Euler's number in the section *About Numbers*. For now, all you really need to know is that *e* can be found using the following formula:

e = | lim | (1 + n)^{1/n} |

δn→0 |

This is one of several ways in which *e* can be defined. We will see why this particular formula is significant in due course. Meanwhile, in order to differentiate the exponential function *e ^{ x}*, we will need to go back to first principles. Remember that our

*limit definition*of the derivative of a function is as follows:

d | (ƒ(x)) = | lim | ƒ(x + δx) - ƒ(x) | |

dx | δx→0 | δx |

Rewriting this definition for the exponential function *e ^{ x}* we get:

d | (e ) = ^{ x} | lim | e^{ (x + δx)} - e^{ x} | |

dx | δx→0 | δx |

We can rewrite this definition using the exponent rules to get:

d | (e ) = ^{ x} | lim | e^{ x}e^{ δx} - e^{ x} | |

dx | δx→0 | δx |

Now we can factor out *e ^{ x}*:

d | (e ) = ^{ x} | lim | e^{ x}(e^{ δx} - 1) | |

dx | δx→0 | δx |

Since the limit applies only to the term δ*x*, we can now move the term *e ^{ x}* and place it in front of the limit:

d | (e ) = ^{ x}e^{ x} | lim | e^{ δx} - 1 | |

dx | δx→0 | δx |

Clearly, what we now need to know is what limit (*e*^{ δx} - 1)/δ*x* approaches as δ*x* approaches zero. We can't simply substitute zero for δ*x*, since that would give us a fraction with zero in both the denominator and the numerator. Such a fraction would have an undefined value, which is not very helpful. However, we can look at what happens to the limit as the value of δ*x* approaches zero from either direction:

δx | (e^{ δx} - 1)/δx |

-0.100000 | 0.951626 |

-0.010000 | 0.995017 |

-0.001000 | 0.999500 |

-0.000100 | 0.999950 |

-0.000010 | 0.999995 |

-0.000001 | 0.999999 |

0.000000 | - |

0.000001 | 1.000000 |

0.000010 | 1.000005 |

0.000100 | 1.000050 |

0.001000 | 1.000500 |

0.010000 | 1.005017 |

0.100000 | 1.051709 |

You can see from the table that as the value of δ*x* approaches zero, the limit approaches *one* (1). Indeed, if we draw the graph of the function *y* = (*e ^{ x}* - 1)/x, we can see that the graph intercepts the

*y*axis at

*y*= 1.

The graph of the function *y* = (*e ^{ x}* - 1)/x

From this evidence, we can conclude that:

lim | e^{ δx} - 1 | = 1 | |

δx→0 | δx |

and therefore:

d | (e) = ^{ x }e^{ x} | lim | e^{ δx} - 1 | = e ^{ x}· 1 = e^{ x} | |

dx | δx→0 | δx |

In other words, the derivative of the exponential function *is* the exponential function!

d | (e) = ^{ x }e^{ x} |

dx |

##

The natural logarithmic function ln (*x*)

Before we deal with logarithmic functions generally we will examine the natural logarithm function ln (*x*) or log* _{e}*(

*x*). This function returns the exponent that the base value

*e*(approximately 2.7183) must be raised to in order to obtain

*x*. It is therefore the inverse function to the exponential function

*e*. The graph of this inverse function is a reflection of the graph of the exponential function in the line

^{ x}*y*=

*x*(see below).

The natural logarithm function ln (*x*) is the inverse of the exponential function *y* = *e ^{ x}*

In order to differentiate the logarithmic function ln (*x*), we will once again go back to first principles. Just to remind you, here once more is the limit definition of the derivative of a function:

d | (ƒ(x)) = | lim | ƒ(x + δx) - ƒ(x) | |

dx | δx→0 | δx |

If we replace ƒ(*x*) with the natural logarithm function ln (*x*) we get:

d | (ln (x)) = | lim | ln (x + δx) - ln (x) | |

dx | δx→0 | δx |

We will now make use of the second law of logarithms, which states that the logarithm of the *quotient* of two numbers (i.e. the result of dividing one number by another) can be found by subtracting the logarithm of the *divisor* (the number we are dividing by) from the logarithm of the *dividend* (the number we want to divide). This is expressed formally as:

log(_{b}m) - log(_{b}n) = log_{b} | m |

n |

For the moment, we are going to concentrate on rewriting the expression to the right of the limit in our definition of the derivative of ln (*x*). Applying the second law of logarithms and a little bit of algebra, we get the following:

ln (x + δx) - ln (x) | = | l | ln | ( | x + δx | ) | = | l | ln | ( | 1 + | δx | ) |

dx | dx | x | dx | x |

In order to simplify things somewhat, we are now going to substitute the letter *n* for the expression δ*x*/*x*, so that:

n = | dx |

x |

It therefore follows that:

δ*x* = *xn*

We are making this substitution because the ratio of δ*x* to *x* plays an important part in the calculations that will follow. The possibility of x being zero is not an issue here, since logarithmic functions can only be applied directly to positive numbers greater than zero. Anyway, having made our substitution, we now get:

ln (x + δx) - ln (x) | = | l | ln (l + n) |

dx | xn |

We now turn to the third law of logarithms, which states that the logarithm of a number raised to a power can be found by multiplying the logarithm of the base by the *exponent* (i.e. the power to which the base must be raised). This is expressed formally as:

log* _{b}* (

*m*) =

^{n}*n*log

*(*

_{b}*m*)

We can use this law to rewrite the definition of our derivative once more, as follows:

ln (x + δx) - ln (x) | = | l | ln (l + n)^{1/n} |

dx | x |

In order to obtain the derivative, we would normally allow δ*x* tend to zero. However, since we have substituted *n* for δ*x*/x, we need instead to allow *n* tend to zero, which gives us:

d | (ln (x)) = | lim | 1 | ln (l + n)^{1/n} | |

dx | n→0 | x |

However, since the limit only applies to *n*, we can move the term ^{1}/*x* in front of the limit:

d | (ln (x)) = | 1 | lim | ln (l + n)^{1/n} | ||

dx | x | n→0 |

You may be thinking that something about this looks familiar, and rightly so. When we began looking at how to differentiate the exponential function *e ^{ x}*, we briefly looked at the origins of

*Euler's number*(

*e*), and saw the following definition for

*e*:

e = | lim | (1 + n)^{1/n} | |

δn→0 |

This means that we can simplify our definition of the derivative of ln (*x*) to:

d | (ln (x)) = | 1 | ln (e) |

dx | x |

Since *e* is the base of the natural logarithm, ln (*e*) is equal to *one* (1), and we now have:

d | (ln (x)) = | 1 |

dx | x |

##

Logarithmic functions to other bases

We could of course attempt to find the derivative of a logarithmic function that uses a base other than *e* from first principles, but this is not really necessary. There is a far easier way to achieve the same result, since we already have the derivative of ln (*x*). Let's say we want to find the differential of the logarithmic function log* _{b}*(

*x*), where

*b*is a positive real number not equal to one (

*b*≠ 1). If we can change the base of this logarithmic function from

*b*to

*e*, we can find the differential by applying the formula we obtained for the derivative of ln (

*x*) to the result. We will use the logarithmic

*base change formula*to achieve this:

log_{b} (x) = | ln (x) |

ln (b) |

Differentiation now proceeds as follows:

d | (log (_{b}x)) = | d | ( | ln (x) | ) |

dx | dx | ln (b) |

Since *b* is a constant, ln (*b*) will also be a constant, and we can therefore apply the constant coefficient rule. This rule states that the derivative of c **·** ƒ(*x*), where ƒ(*x*) is some function and *c* represents a constant coefficient, is equal to the derivative of ƒ(*x*) multiplied by *c*. We can therefore factor ln (*b*) out of the derivative to give us:

d | (log (_{b}x)) = | 1 | · | d | (ln (x)) |

dx | ln (b) | dx |

Therefore, since we already know that the derivative of ln (*x*) is ^{1}/*x*, we have:

d | (log (_{b}x)) = | 1 | · | 1 | = | 1 |

dx | ln (b) | x | x ln (b) |

##

Exponential functions to other bases

As we have seen, all exponential functions take the form ƒ(*x*) = *c ^{ x}*, where the constant value

*c*is the base, and the variable

*x*is the exponent to which

*c*is raised. It is also true that for all exponential functions, the

*instantaneous rate of change*of the function (i.e. the

*derivative*) is proportional to its output. In other words, the derivative of

*cx*is proportional to

*cx*. To express this formally we can say that, for any exponential function ƒ(

*x*) =

*c*, there is an associated constant of proportionality

^{ x}*k*, such that:

d | (c ) = ^{ x}k c^{ x} |

dx |

In the case of the exponential function *e ^{ x}*, the constant of proportionality is

*one*(1), so that:

d | (e) = ^{ x }e^{ x} |

dx |

So, we already have the differential for the exponential function *e ^{ x}*. If we could express the exponential function

*c*in terms of

^{ x}*e*, we could use this to find the derivative of

*c*. Our exponential function to base

^{ x}*c*gives us:

*y* = *c ^{ x}*

If we take the natural logarithm of both sides, we get:

ln (*y*) = *x* **·** ln (*c*)

To get the right-hand side of this equation, we have used the *third law of logarithms*, which states that the logarithm of a number raised to a power can be found by multiplying the logarithm of the base by the *exponent* (i.e. the power to which the base must be raised). Supposing we now take the derivative:

d | (ln (y)) = | d | (x · ln (c)) |

dx | dx |

Since we know that *c* is a constant, ln (*c*) must also be a constant, and we can therefore apply the *constant coefficient rule* to rearrange the expression on the right-hand side as follows:

d | (ln (y)) = ln (c) | d | (x) = ln (c) · 1 = ln (c) |

dx | dx |

We now need to turn to the *chain rule*. You may recall that the chain rule gives us a way of finding the differential of a *composite function* (i.e. a function that is applied to another function). The term ln (*y*) effectively represents the composite function ln (*c ^{ x }*), because

*y*=

*c*. The chain rule states that to find the derivative of the composite of two functions, we must multiply the derivative of the outer function by the derivative of the inner function. In this case, we have a composite function for which the outer function is the natural logarithm function and the inner function is

^{ x}*c*. In keeping with the essence of the chain rule, however, we can consider

^{ x}*y*to be a substitution for

*c*. Slotting the values we have into the chain rule formula, we get:

^{ x}d | (ln (y)) = | d | (ln (y)) · | d | (y) |

dx | dy | dx |

We already know that the derivative of the composite function ln (*y*) is ln (*c*), so we can rewrite this as:

d | (ln (y)) · | d | (y) = ln (c) |

dy | dx |

However, we also know that the derivative of ln (*y*) is going to be ^{1}/*y*, so we now have:

1 | · | d | (y) = ln (c) |

y | dx |

and therefore:

d | (y) = ln (c) · y |

dx |

If we now swap *c ^{ x}* back in for

*y*, we have:

d | (c) = ln (^{ x }c) · c^{ x} |

dx |

We now have a formula for the derivative of any exponential function *c ^{ x}*, regardless of the value of the base

*c*. To put this into words, if we multiply any exponential function by the natural logarithm of its base, we get its derivative. Obviously, if the base happens to be

*e*, then the natural logarithm of the base will be

*one*, and the derivative will be the exponential function itself, as we have already seen.