Lesson Explainer: Differentiation of Logarithmic Functions | Nagwa Lesson Explainer: Differentiation of Logarithmic Functions | Nagwa

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.

Answer

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𝑢𝑥=45𝑥+22𝑥=20𝑥+4𝑥.

This gives us everything we need to differentiate our function 𝑦=𝑢ln, where 𝑢(𝑥)=5𝑥+2𝑥. Hence, ddddlndddd𝑦𝑥=𝑢(𝑢)𝑢𝑥=1𝑢𝑢𝑥=15𝑥+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

ddlndd𝑥(𝑓(𝑥))=1𝑓(𝑥)𝑓𝑥.

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

Answer

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𝑢(𝑥)𝑢(𝑥)=32+2𝑥+4𝑥.

Finally, we evaluate our derivative at 𝑥=1: 𝑓(1)=32+(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.

Answer

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𝑦𝑥=71𝑣(𝑥)𝑣𝑥=71(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.

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 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.

Answer

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𝑥=258𝑥, 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)21, 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)21, that is, 𝑛 factorial, and (1)=1 for odd integers 𝑛 and 1 if 𝑛 is an even integer.

Join Nagwa Classes

Attend live sessions on Nagwa Classes to boost your learning with guidance and advice from an expert teacher!

  • Interactive Sessions
  • Chat & Messaging
  • Realistic Exam Questions

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