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 x. The roles of the variable and the constant value have changed places. The constant value c becomes the base, and the variable x is the exponent to which c is raised. The inverse of the exponential function y = c x is the logarithmic function x = logc(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

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 x, where 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 )  =  lime (x + δx)  -  e x
dxδx→0δx

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

d(e x )  =  limexe δx  -  e x
dxδx→0δx

Now we can factor out e x:

d(e x )  =  limex(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 xlime δ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.1000000.951626
-0.0100000.995017
-0.0010000.999500
-0.0001000.999950
-0.0000100.999995
-0.0000010.999999
0.000000-
0.0000011.000000
0.0000101.000005
0.0001001.000050
0.0010001.000500
0.0100001.005017
0.1000001.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

The graph of the function y = (e x - 1)/x


From this evidence, we can conclude that:

lime δx - 1  =  1
δx→0δx

and therefore:

d(e x )  =  e xlime δ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 loge(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 x. The graph of this inverse function is a reflection of the graph of the exponential function in the line y = x (see below).


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

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))  =  limln (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:

logb(m) - logb(n)  =  logbm
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)  =  llnx + δx )  =  lln(1 + δx )
dxdxxdxx

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)  =  lln (l + n)
dxxn

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:

logb (mn)  =  n logb (m)

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

ln (x + δx) - ln (x)  =  lln (l + n)1/n
dxx

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))  =  lim1ln (l + n)1/n
dxn→0x

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

d(ln (x))  =  1limln (l + n)1/n
dxxn→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))  =  1ln (e)
dxx

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

d(ln (x))  =  1
dxx


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 logb(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:

logb (x)  =  ln (x)
ln (b)

Differentiation now proceeds as follows:

d(logb (x))  =  d (ln (x))
dxdxln (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 · ƒ(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(logb (x))  =  1 · d(ln (x))
dxln (b)dx

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

d(logb (x))  =  1 · 1  =  1
dxln (b)xx 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 x, there is an associated constant of proportionality 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 x in terms of e, we could use this to find the derivative of c x. Our exponential function to base 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))
dxdx

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)
dxdx

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 x. 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 c x. In keeping with the essence of the chain rule, however, we can consider y to be a substitution for c x. Slotting the values we have into the chain rule formula, we get:

d(ln (y))  =  d(ln (y)) · d(y)
dxdydx

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)
dydx

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)
ydx

and therefore:

d(y)  =  ln (c· y
dx

If we now swap c x back in for y, we have:

d(c x )  =  ln (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.