Lesson Explainer: Differentiation of Logarithmic Functions Mathematics

In this explainer, we will learn how to find the derivatives of logarithmic functions.

The number π‘’β‰ˆ2.71828…, known as Euler’s number or sometimes Napier’s constant, is an important mathematical constant. It is the base of the natural logarithm, logln=, and as functions, 𝑒 and lnπ‘₯ are inverses of one another. If we plot the function 𝑦=𝑒 and reflect it in the line 𝑦=π‘₯, we obtain the graph of 𝑦=π‘₯ln.

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 𝑦=π‘₯ln is undefined for π‘₯=0 and does not exist for negative values of π‘₯. Hence, lnπ‘₯ is defined only for values of π‘₯>0 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 ddπ‘₯𝑒=𝑒.

This property comes in very useful when we want to differentiate the natural logarithm function as follows.

Given the function 𝑦=π‘₯,ln since 𝑒 and lnπ‘₯ are inverses, we have 𝑒=𝑒=π‘₯.ο˜ο—ln

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, 𝑓(𝑔(π‘₯)), ddddddπ‘₯𝑓(𝑔(π‘₯))=𝑓𝑔⋅𝑔π‘₯.

Applying the chain rule to our function, we have ddddddddπ‘₯𝑒=π‘₯π‘₯βŸΉπ‘¦π‘’β‹…π‘¦π‘₯=1.

Now, since dd𝑦𝑒=π‘’ο˜ο˜ and 𝑒=π‘₯, this means that π‘₯⋅𝑦π‘₯=1βŸΉπ‘¦π‘₯=1π‘₯.dddd

This results in the following.

Theorem: The Derivative of Natural Logarithm Function

The derivative of the natural logarithm function 𝑦=π‘₯ln with respect to π‘₯ is ddlnπ‘₯π‘₯=1π‘₯,π‘₯>0.

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 𝑦=ο€Ήβˆ’5π‘₯+2π‘₯lnοŠͺ.


We are given a function of the form 𝑦=𝑒ln, where 𝑒 is a function of π‘₯; specifically, 𝑒(π‘₯)=βˆ’5π‘₯+2π‘₯οŠͺ. 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 𝑓(𝑔(π‘₯)), ddddddπ‘₯𝑓(𝑔(π‘₯))=𝑓𝑔⋅𝑔π‘₯. In our case, this translates to ddlnddlnddπ‘₯(𝑒)=𝑒(𝑒)⋅𝑒π‘₯.

We also know the general result that for 𝑒>0, ddln𝑒(𝑒)=1𝑒. To complete our derivative then, we need to find the derivative of 𝑒 with respect to π‘₯, that is, dd𝑒π‘₯.

Since 𝑒(π‘₯)=βˆ’5π‘₯+2π‘₯οŠͺ, which is a polynomial in π‘₯, we use the power rule to differentiate, which gives us dd𝑒π‘₯=βˆ’4β‹…5π‘₯+2β‹…2π‘₯=βˆ’20π‘₯+4π‘₯.

This gives us everything we need to differentiate our function 𝑦=𝑒ln, where 𝑒(π‘₯)=βˆ’5π‘₯+2π‘₯οŠͺ. Hence, ddddlndddd𝑦π‘₯=𝑒(𝑒)⋅𝑒π‘₯=1𝑒⋅𝑒π‘₯=1βˆ’5π‘₯+2π‘₯β‹…ο€Ήβˆ’20π‘₯+4π‘₯=βˆ’20π‘₯+4π‘₯βˆ’5π‘₯+2π‘₯.οŠͺοŠͺ

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 βˆ’1 so that dd𝑦π‘₯=π‘₯ο€Ή20π‘₯βˆ’4π‘₯(5π‘₯βˆ’2).

Finally, canceling π‘₯ in the numerator with a single power of π‘₯ in the denominator, we have the first derivative dd𝑦π‘₯=20π‘₯βˆ’4π‘₯(5π‘₯βˆ’2).

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, ddlnπ‘₯(𝑓(π‘₯))=1𝑓(π‘₯)⋅𝑓′(π‘₯).

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 𝑓(π‘₯)=3(2π‘₯+4π‘₯)lnln, find 𝑓′(1).


To find 𝑓′(1), where 𝑓′=𝑓π‘₯dd, we must first differentiate 𝑓 with respect to π‘₯ and then substitute π‘₯=1 into our result. To differentiate our function 𝑓(π‘₯), we note that 𝑓 is a composite function, that is, a function of a function: 𝑓(π‘₯)=𝑓(𝑒(π‘₯))=3𝑒(π‘₯)ln, where 𝑒(π‘₯)=2π‘₯+4π‘₯ln. Therefore, we need to apply the chain rule for differentiation, which we know, specifically for logarithmic functions, to be ddlnπ‘₯(𝑒(π‘₯))=1𝑒(π‘₯)⋅𝑒′(π‘₯).

For this we will need to find the derivative 𝑒′(π‘₯), and since 𝑒(π‘₯)=2π‘₯+4π‘₯ln, we can use the fact that ddlnπ‘₯π‘₯=1π‘₯. We then have dd𝑒π‘₯=𝑒′(π‘₯)=2+4π‘₯.

We can now use this in the chain rule for 𝑓′, so that, for 𝑓(π‘₯)=3(2π‘₯+4π‘₯)lnln, ddln𝑓π‘₯=𝑓′(π‘₯)=3𝑒(π‘₯)⋅𝑒′(π‘₯)=3ο€»2+2π‘₯+4π‘₯.οŠͺ

Finally, we evaluate our derivative at π‘₯=1: 𝑓′(1)=3ο€»2+(2Γ—1)+41.οŠͺln

Since ln1=0, this evaluates to 𝑓′(1)=3(2+4)2=9.

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:logloglogοŒΊοŒΊοŒΊπ‘π‘=𝑏+𝑐

Quotient Rule for Logarithms:logloglogοŒΊοŒΊοŒΊπ‘π‘=π‘βˆ’π‘

Law of Exponents for Logarithms:loglogοŒΊοŒΌοŒΊπ‘=𝑐𝑏

Change of Base of Logarithms:logloglogοŒΊοŒΌοŒΌπ‘=π‘π‘Ž

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 dd𝑦π‘₯, given that 𝑦=(4π‘₯+5)ln.


Our function 𝑦 is of the form 𝑦=𝑒ln, where 𝑒 is a function of π‘₯, specifically, 𝑒(π‘₯)=(4π‘₯+5). We could apply the chain rule immediately so that, since 𝑦 is a logarithmic function, dd𝑦π‘₯=1𝑒(π‘₯)⋅𝑒′(π‘₯). 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, loglogοŒΊοŒΌοŒΊπ‘=𝑐𝑏.

In our case, the exponent 𝑐 is 7, so we can bring down the constant 7 in front of the logarithm. Hence, 𝑦=(4π‘₯+5)=7(4π‘₯+5).lnln

Now applying the chain rule, with 𝑣(π‘₯)=4π‘₯+5, we have dddd𝑦π‘₯=7β‹…1𝑣(π‘₯)⋅𝑣π‘₯=7β‹…1(4π‘₯+5)β‹…4=284π‘₯+5.

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 𝑦=βˆ’7π‘₯6π‘₯οŠͺοŠͺln.


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 logloglogοŒΊοŒΊοŒΊπ‘π‘=𝑏+𝑐.

For our function 𝑦, this means that we may split our logarithmic term into two parts; thus, 𝑦=βˆ’7π‘₯6+π‘₯.οŠͺοŠͺlnln

We can simplify further using the law of exponents for logarithms, which tells us that loglogοŒΊοŒΌοŒΊπ‘=𝑐𝑏.

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 𝑦=βˆ’7π‘₯[6+4π‘₯].οŠͺlnln

Our function is now a product 𝑦=𝑒(π‘₯)⋅𝑣(π‘₯), where 𝑒(π‘₯)=βˆ’7π‘₯οŠͺ and 𝑣(π‘₯)=6+4π‘₯lnln. Therefore, we may apply the product rule for differentiation. That is, for a differentiable function 𝑦(π‘₯)=𝑒(π‘₯)𝑣(π‘₯), dddddd𝑦π‘₯=𝑒(π‘₯)𝑣π‘₯+𝑣(π‘₯)𝑒π‘₯.

We require the derivatives, dd𝑣π‘₯ and dd𝑒π‘₯, so let us begin by finding dd𝑒π‘₯.

With 𝑒(π‘₯)=βˆ’7π‘₯οŠͺ, we can apply the power rule for differentiation so that dd𝑒π‘₯=4β‹…(βˆ’7)π‘₯=βˆ’28π‘₯.

To find dd𝑣π‘₯, that is, ddddlnln𝑣π‘₯=π‘₯(6+4π‘₯), we note first that since ln6 is a constant, its derivative is zero. For the second term we use the result that, for a logarithmic function 𝑔(π‘₯)=π‘₯ln, dd𝑔π‘₯=1π‘₯. Hence, dd𝑣π‘₯=4π‘₯.

We can now use these results to apply the product rule to our original function 𝑦; thus, ddddddlnlnlnln𝑦π‘₯=𝑒(π‘₯)𝑣π‘₯+𝑣(π‘₯)𝑒π‘₯=βˆ’7π‘₯β‹…4π‘₯+(6+4π‘₯)β‹…ο€Ήβˆ’28π‘₯=βˆ’28π‘₯+(6+4π‘₯)ο€Ήβˆ’28π‘₯.οŠͺ

Noting that we have a common factor of βˆ’28π‘₯, which we can take outside some parentheses, and rearranging, we have βˆ’28π‘₯(6+4π‘₯+1),lnln and applying the law of exponents in reverse to the second term inside the parentheses, we have ddlnln𝑦π‘₯=βˆ’28π‘₯ο€Ή6+π‘₯+1.οŠͺ

Finally, using the product rule for logarithms in reverse gives us the first derivative ddln𝑦π‘₯=βˆ’28π‘₯ο€Ήο€Ή6π‘₯+1.οŠͺ

In our final example, we find higher derivatives of a logarithmic function.

Example 5: Finding the Third Derivative of a Logarithmic Function

Find ddοŠ©οŠ©π‘¦π‘₯, given that 𝑦=584π‘₯ln.


We begin by noting that since the argument of the logarithm in our function is a product, specifically 4π‘₯, we can use the product rule for logarithms to separate the logarithm into two terms as follows. The product rule for logarithms states that logloglogοŒΊοŒΊοŒΊπ‘π‘=𝑏+𝑐.

For our function 𝑦=584π‘₯ln then, we have 𝑦=58[4+π‘₯].lnln

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 58 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 ddddlnddln𝑦π‘₯=58Γ—π‘₯4+58Γ—π‘₯π‘₯.

Since the derivative of a constant is zero, our first term is equal to zero, and we have ddddln𝑦π‘₯=58Γ—π‘₯π‘₯.

We know that ddlnπ‘₯π‘₯=1π‘₯; hence, our first derivative is dd𝑦π‘₯=58Γ—1π‘₯.

To find our second derivative, ddοŠ¨οŠ¨π‘¦π‘₯, we differentiate our first derivative above, with respect to π‘₯. Again keeping our constant 58 outside of our derivative, we have ddddοŠ¨οŠ¨π‘¦π‘₯=58Γ—π‘₯ο€Ό1π‘₯.

And since 1π‘₯=π‘₯, we can rewrite this as ddddοŠ¨οŠ¨οŠ±οŠ§π‘¦π‘₯=58Γ—π‘₯π‘₯.

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 ddοŠ¨οŠ¨οŠ±οŠ¨π‘¦π‘₯=(βˆ’1)58π‘₯.

We can now easily find our third derivative by differentiating the second derivative, again keeping our constant out front: ddddοŠ©οŠ©οŠ±οŠ¨π‘¦π‘₯=(βˆ’1)58Γ—π‘₯π‘₯.

Again using the power rule for differentiation, we have the third derivative: ddοŠ©οŠ©οŠ±οŠ©οŠ±οŠ©π‘¦π‘₯=(βˆ’2)(βˆ’1)58π‘₯=2β‹…58π‘₯, which we can rewrite as ddοŠ©οŠ©οŠ©π‘¦π‘₯=54π‘₯.

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 𝑦=(π‘Žπ‘₯+𝑏)ln, where π‘Ž and 𝑏 are constants and π‘Žπ‘₯+𝑏>0; then the 𝑛th derivative of 𝑦 is ddοŠοŠοŠοŠ±οŠ§οŠοŠπ‘¦π‘₯=(βˆ’1)π‘Ž(π‘›βˆ’1)(π‘Žπ‘₯+𝑏), where (π‘›βˆ’1)=𝑛⋅(π‘›βˆ’1)β‹…(π‘›βˆ’2)β‹…β‹―β‹…2β‹…1, that is, 𝑛 factorial, and (βˆ’1)=1 for odd integers 𝑛 and βˆ’1 if 𝑛 is an even integer.

In our example above, 𝑏=0 and 𝑛=3. We complete our discussion on differentiating logarithmic functions by recalling some key points.

Key Points

  • The natural logarithm function 𝑦=π‘₯=π‘₯logln is the inverse of 𝑦=𝑒.
  • ddlnπ‘₯π‘₯=1π‘₯,π‘₯>0
  • If 𝑦=𝑓(π‘₯)ln, then dd𝑦π‘₯=𝑓′(π‘₯)𝑓(π‘₯).
  • 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:Β logloglogοŒΊοŒΊοŒΊπ‘π‘=𝑏+𝑐
    Quotient rule:Β logloglogοŒΊοŒΊοŒΊπ‘π‘=π‘βˆ’π‘
    Law of exponents:Β loglogοŒΊοŒΌοŒΊπ‘=𝑐𝑏
    Change of base:Β logloglogοŒΊοŒΌοŒΌπ‘=π‘π‘Ž
  • 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 𝑦=𝑓(π‘₯)ln, where 𝑓(π‘₯)=(π‘Žπ‘₯+𝑏), π‘Ž and 𝑏 are constants, and π‘Žπ‘₯+𝑏>0, then the 𝑛th derivative of 𝑦 with respect to π‘₯ is ddοŠοŠοŠοŠ±οŠ§οŠοŠπ‘¦π‘₯=(βˆ’1)π‘Ž(π‘›βˆ’1)(π‘Žπ‘₯+𝑏), where (π‘›βˆ’1)=𝑛⋅(π‘›βˆ’1)β‹…(π‘›βˆ’2)β‹…β‹―β‹…2β‹…1, that is, 𝑛 factorial, and (βˆ’1)=1 for odd integers 𝑛 and βˆ’1 if 𝑛 is an even integer.

Nagwa uses cookies to ensure you get the best experience on our website. Learn more about our Privacy Policy.