In this explainer, we will learn how to find the derivatives of logarithmic functions.
The number , known as Eulerβs number or sometimes Napierβs constant, is an important mathematical constant. It is the base of the natural logarithm, , and as functions, and are inverses of one another. If we plot the function and reflect it in the line , we obtain the graph of .
From these graphs we can see that is never negative; that is, there is no value of for which is negative, and we can also see that is undefined for and does not exist for negative values of . Hence, is defined only for values of and we will take this as a given throughout this explainer. The function has the remarkable property that, at any given point on the curve, its slope is equal to its value at that point. In terms of derivatives, this means that
This property comes in very useful when we want to differentiate the natural logarithm function as follows.
Given the function since and are inverses, we have
Now suppose we want to differentiate with respect to . On our left-hand side, our exponent is a function of ; that is, we have a function of a function, or a composite function. Therefore, to differentiate, we use the chain rule, which is defined as follows.
Definition: The Chain Rule for Differentiation
For a composite differentiable function, ,
Applying the chain rule to our function, we have
Now, since and , this means that
This results in the following.
Theorem: The Derivative of Natural Logarithm Function
The derivative of the natural logarithm function with respect to is
We may also consider more complicated logarithmic functions, where the argument of the natural logarithm is itself a function of . Since we again have a composite function, that is, a function of a function, we can use the chain rule once more to differentiate with respect to . Let us see how this works in an example.
Example 1: Differentiating Logarithmic Functions Using the Chain Rule
Find the first derivative of the function .
Answer
We are given a function of the form , where is a function of ; specifically, . We know that for a function of a function, that is, a composite function, we use the chain rule to differentiate. In other words, for a function , . In our case, this translates to
We also know the general result that for , . To complete our derivative then, we need to find the derivative of with respect to , that is, .
Since , which is a polynomial in , we use the power rule to differentiate, which gives us
This gives us everything we need to differentiate our function , where . Hence,
In our numerator we have a common factor of that we can take outside the parentheses, and from our denominator, we extract a common factor of . We may also multiply both numerator and denominator by so that
Finally, canceling in the numerator with a single power of in the denominator, we have the first derivative
This example demonstrates the general principle for differentiating logarithmic functions. To apply the chain rule to a function, we take the derivative of the outside function and multiply it by the derivative of the inside function. In the case of logarithmic functions, the outside function is the logarithm itself, and its derivative is the reciprocal of the argument. The inside function is the argument of the logarithm. This gives us the general rule for differentiating logarithmic functions.
Theorem: General Rule for Differentiation of Logarithmic Functions
That is,
Let us now apply this rule and differentiate a combination of logarithmic functions to find the value of the derivative at a point.
Example 2: Differentiating a Combination of Logarithmic Functions Using the Chain Rule at a Point
If , find .
Answer
To find , where , we must first differentiate with respect to and then substitute into our result. To differentiate our function , we note that is a composite function, that is, a function of a function: , where . Therefore, we need to apply the chain rule for differentiation, which we know, specifically for logarithmic functions, to be
For this we will need to find the derivative , and since , we can use the fact that . We then have
We can now use this in the chain rule for , so that, for ,
Finally, we evaluate our derivative at :
Since , this evaluates to
It is sometimes possible, when differentiating logarithmic functions, to first apply the laws of logarithms to our function in order to simplify the differentiation. Recall the following laws of logarithms.
Properties: The Laws of Logarithms
Product Rule for Logarithms:
Quotient Rule for Logarithms:
Law of Exponents for Logarithms:
Change of Base of Logarithms:
Let us see how this might work in an example where we differentiate a logarithmic function using the chain rule after first using the laws of logarithms to simplify our function.
Example 3: Differentiating Logarithmic Functions Using the Chain Rule and the Laws of Logarithms
Find , given that .
Answer
Our function is of the form , where is a function of , specifically, . We could apply the chain rule immediately so that, since is a logarithmic function, . However, this would mean using the chain rule a second time to find the derivative of , since is itself a composite function. While this poses no difficulties, it may be slightly quicker to first apply one of the laws of logarithms to simplify our function before we begin differentiating.
Since our inner function involves an exponent, we can apply the law of exponents for logarithms; namely,
In our case, the exponent is 7, so we can bring down the constant 7 in front of the logarithm. Hence,
Now applying the chain rule, with , we have
In our next example, we will use both the chain rule and the product rule to differentiate a function that is a product of a polynomial and a logarithmic function.
Example 4: Differentiating Combinations of Polynomial and Logarithmic Functions Using Product and Chain Rules
Find the first derivative of the function .
Answer
We can begin by simplifying our function , using the laws of logarithms. The argument of our logarithm is a product and the product rule for logarithms tells us that
For our function , this means that we may split our logarithmic term into two parts; thus,
We can simplify further using the law of exponents for logarithms, which tells us that
For our function , this means that we can bring the exponent, 4, in the argument of the second logarithm, to the front of this logarithm so that
Our function is now a product , where and . Therefore, we may apply the product rule for differentiation. That is, for a differentiable function ,
We require the derivatives, and , so let us begin by finding .
With , we can apply the power rule for differentiation so that
To find , that is, we note first that since is a constant, its derivative is zero. For the second term we use the result that, for a logarithmic function , . Hence,
We can now use these results to apply the product rule to our original function ; thus,
Noting that we have a common factor of , which we can take outside some parentheses, and rearranging, we have and applying the law of exponents in reverse to the second term inside the parentheses, we have
Finally, using the product rule for logarithms in reverse gives us the first derivative
In our final example, we find higher derivatives of a logarithmic function.
Example 5: Finding the Third Derivative of a Logarithmic Function
Find , given that .
Answer
We begin by noting that since the argument of the logarithm in our function is a product, specifically , we can use the product rule for logarithms to separate the logarithm into two terms as follows. The product rule for logarithms states that
For our function then, we have
We are asked to find the third derivative with respect to , so we must differentiate our function three times in succession. We may take the constant outside of our derivative, and using the fact that the derivative of a sum is equal to the sum of the derivatives, our first derivative is
Since the derivative of a constant is zero, our first term is equal to zero, and we have
We know that ; hence, our first derivative is
To find our second derivative, , we differentiate our first derivative above, with respect to . Again keeping our constant outside of our derivative, we have
And since , we can rewrite this as
Using the power rule for differentiation, that is, multiplying by the exponent and subtracting one from the exponent, we find that our second derivative is
We can now easily find our third derivative by differentiating the second derivative, again keeping our constant out front:
Again using the power rule for differentiation, we have the third derivative: which we can rewrite as
In this example, we have encountered a particular instance of the following general theorem for finding the th derivative of a logarithmic function where the argument is a linear function of .
Theorem: Higher Derivative of Natural Logarithmic Function
If , where and are constants and ; then the th derivative of is where , that is, factorial, and for odd integers and if is an even integer.
In our example above, and . We complete our discussion on differentiating logarithmic functions by recalling some key points.
Key Points
- The natural logarithm function is the inverse of .
- If , then .
- When differentiating logarithmic functions, we may use the laws of logarithms prior to differentiation to
make our function more manageable. The laws of logarithms are as follows:
Product rule:Β
Quotient rule:Β
Law of exponents:Β
Change of base:Β - We use the rules for the differentiation of logarithmic functions in conjunction with the standard rules for differentiation, that is, the product, quotient, and chain rules.
- If , where , and are constants, and , then the th derivative of with respect to is where , that is, factorial, and for odd integers and if is an even integer.