Derivatives of Logarithms

Lesson Features »

Lesson Priority: High

 
Objectives
  • Learn how to take the derivative of $\ln (x)$
  • Modify the derivative of the natural log to be able to take the derivative of any base log
  • Extend our knowledge to know the derivative of an expression of the form $\log_b (ax + c)$ where $a$, $b$, and $c$ are constant coefficients
  • Leverage logarithm manipulation rules to find derivatives of otherwise complicated log expressions
Lesson Description

The derivative of the natural logarithm function is incredibly useful for both semesters of Calculus. This lessons will start by showing us how to take the derivative of this fundamental function, before also showing us how to leverage old-school log rules for taking derivatives of complicated log expressions.

 
Practice Problems

Practice problems and worksheet coming soon!

 
You Should Know
This lesson focuses on taking derivatives of expressions that contain logarithms. If you need to learn how to use logarithms as a tool to make derivatives easier, you're looking for the upcoming lesson on logarithmic differentiation ».

The Derivative of a Logarithm

Before we get into complicated expressions that involve logs, it makes sense to start with understanding the derivative of standalone log functions. Like exponentials (and not coincidentally), the simplest case of differentiating a logarithm is for logarithms base $e$ - i.e. the natural log. To that end, let's start with the derivative of the function $f(x) = \ln(x)$.
Define: Derivative of the Natural Log$$\frac{d}{dx} \,\, \ln(x) = \frac{1}{x}$$
Naturally (pun intended), this fact alone is not very testable on an exam - you either know it or you don't. But just like we saw how exponential derivatives started with the know-it-or-not fact that $\frac{d}{dx} \, e^x = e^x$ and found varying results with different bases and constants, so too will we see the ways that derivatives of logarithms may be affected by different bases and constants.
Define: Derivatives of Any Logarithms$$\frac{d}{dx} \,\, \log_b(x) = \frac{1}{x} \cdot \frac{1}{\ln(b)} = \frac{1}{x\ln(b)}$$
For the derivation aficionados in the crowd, this result is quickly obtainable from the immediately prior definition, applying the logarithm change of base » formula first. I will leave that derivation for you, and instead look at some examples.
 
Example 1$$\frac{d}{dx} \,\, -3\ln(x)$$$$\blacktriangleright \,\, \frac{-3}{x}$$
 
Example 2$$\frac{d}{dx} \,\, \log_2(x)$$$$\blacktriangleright \,\, \frac{1}{x\ln(2)}$$
 
Example 3$$\frac{d}{dx} \,\, 8\log_5(x)$$$\blacktriangleright$ The $8$ constant will stay with the expression, particularly in the numerator. The $5$ log base will appear in a natural log in the denominator.$$\frac{d}{dx} \,\, 8\log_5(x) = \frac{8}{x\ln(5)}$$
Remember!
As we start to work with derivatives that introduce fraction answers, always remember that you're taking the derivative of an expression that has a constant, that the constant will stay in the numerator. E.g.$$\frac{d}{dx} \,\, 8\log_5(x) = \frac{8}{x\ln(5)}$$$$\frac{d}{dx} \,\, 3x^{-1} = -\frac{3}{x^2}$$

Logs With Linear Arguments

While the upcoming lesson on the Chain Rule » will give you all the tools you need and more to find the derivative of nested functions, it's worth taking a look at what happens for derivatives of functions that look like$$y=\ln(ax+b)$$where $a$ and $b$ are real number constants.
Define: Derivative of Logs of Linear ExpressionsFor any function of the form $\ln(ax+b)$ where $a$ and $b$ are real number constants, it follows that$$\frac{d}{dx} \, \ln(ax+b) = \frac{a}{ax+b}$$
Again, the Chain Rule instantly proves this fact, but it's helpful to see right away as you learn about derivatives of logarithms, because teachers sometimes teach and quiz this rule before the class covers the Chain Rule.One interesting result of that is the fact that functions of the form $\ln(ax)$ have the same derivative as $\ln(x)$: they are both $1/x$.
 
Example 4Find$$\frac{d}{dx} \, \ln(5x)$$$\blacktriangleright$ By our rule, this will be$$\frac{d}{dx} \, \ln(5x) = \frac{5}{5x}$$$$=\frac{1}{x}$$This result isn't too surprising because $\ln(5x)$ can be written as $\ln(5) + \ln(x)$ using log manipulation rules, and the log of a constant such as $\ln(5)$ is zero, by the constant rule » for derivatives.

Mr. Math Makes It Mean

Very quickly, teachers will start asking you to take derivatives of fairly complicated logarithm expressions. Fortunately, the derivative of the log of a product and / or quotient of a bunch of things is very manageable thanks to the log manipulation rules » that we learned about in Pre-Calculus.Some of these will require the Chain Rule, but not always. Many of these will only require the linear expression rule we learned above. Either way, it's a good time to start to understand the Chain Rule if your class hasn't already covered it, and some of my examples here will require it. Such examples will mention it's need, but assume you know how to use it. If you don't, head over to the Chain Rule » lesson and come back, or just come back to this later.
Pro Tip
Specific and complicated derivatives are difficult to standardize because of the freedom of teachers to choose the order in which these topics are presented. The best way to master all derivative techniques is to learn each "building block" skill, then each "technique" skill, and finally to revisit the base skills with your full arsenal of technique knowledge.
To refresh, the three log manipulation rules are:
  • ln($xy$) = ln($x$) + ln($y$)
  • ln($x$/$y$) = ln($x$) - ln($y$)
  • ln($x^a$) = $a \cdot$ ln($x$)
 
Example 5$$\frac{d}{dx} \, \ln \left( \frac{x^4 \sqrt{x^2+7}}{\left( 4x+7 \right)^10} \right)$$$\blacktriangleright$ Before we even think about the derivative of a logarithm, the best practice for a problem like this is to leverage those log manipulation rules. The argument of the logarithm is one big mess of product, quotient, and exponents - each of which has a nice rule for logs.Rewrite the expression using the three log rules above.$$\ln \left( \frac{x^4 \sqrt{x^2+7}}{\left( 4x+7 \right)^10} \right)$$$$=\ln\left(x^4\right) +\ln\left( \sqrt{x^2+7} \right) - \ln\left(\left( 4x+7 \right)^10} \right)$$$$=4\ln(x) + \frac{1}{2} \, \ln \left(x^2 + 7 \right) - 10 \ln(4x+7)$$Each of these pieces will be much more manageable to differentiate.$$\frac{d}{dx} \, \ln \left( \frac{x^4 \sqrt{x^2+7}}{\left( 4x+7 \right)^10} \right)$$$$\longrightarrow$$$$\frac{d}{dx} \, \Big[ 4\ln(x) + \frac{1}{2} \, \ln \left(x^2 + 7 \right) - 10 \ln(4x+7) \Big]$$$$=\frac{4}{x} + \frac{x}{x^2 + 7} - \frac{40}{4x+7}$$Note that the middle term required the Chain Rule, and the third term required the linear rule mentioned above.

Put It To The Test

Now, you should be able to handle nearly any derivative they can throw at you that involved logarithms. And, once you learn the Chain Rule, you will be able to handle literally any.Let's see what you got!
 
Example 6$$\frac{d}{dx} \, \log_6 (x)$$
Show solution
$\blacktriangleright$ Since this is a logarithm base $6$, we need to multiply by the natural logarithm of the base in the denominator of our answer, as per our rule for general logarithm derivatives.$$\frac{d}{dx} \, \log_6 (x) = \frac{1}{x} \cdot \frac{1}{\ln(6)}$$
 
Example 7$$\frac{d}{dx} \, \ln (5x - 11)$$
Show solution
$\blacktriangleright$ Following the rule for derivatives of logarithms with linear arguments:$$\frac{d}{dx} \, \ln (5x - 11) = \frac{5}{5x-11}$$
 
Example 8$$\frac{d}{dx} \, \log_3 (2x)$$
Show solution
$\blacktriangleright$ Once again, this is not a natural log, so don't forget the $\ln(3)$ factor in your answer. Also, this is a linear log argument, so that rule must be followed as well.$$\frac{d}{dx} \, \log_3 (2x) = \frac{2}{\ln(3) (2x)}$$
 
Example 9$$\frac{d}{dx} \, \ln \left( \frac{\sqrt[3]{(x-3)^2}}{8x^7 (1-x)^3} \right)$$
Show solution
$\blacktriangleright$ Whenever we see this product / quotient / exponent mess inside of a logarithm, we need to try and break it into simpler logs before trying to take the derivative.$$\ln \left( \frac{\sqrt[3]{(x-3)^2}}{8x^7 (1-x)^3} \right)$$ $$ \longrightarrow \ln \left( (x-3)^{2/3} -\ln(8)$$$$-\ln \left(x^7\right) - \ln \left((1-x)^3\right)$$ $$ \longrightarrow \frac{2}{3} \, \ln (x-3) - \ln(8)$$$$-7\ln (x) - 3\ln(1-x)$$Don't forget that the $8$ is a product and needs to be its own log. The importance of this is that we can't deal with the $7$ exponent until the object to which it belongs, $x$, is alone. The $7$ exponent does not belong to the $8$.$$\frac{d}{dx} \, \ln \left( \frac{\sqrt[3]{(x-3)^2}}{8x^7 (1-x)^3} \right)$$$$\longrightarrow \frac{d}{dx} \, \Bigg[ \frac{2}{3} \, \ln (x-3) - \ln(8)$$$$-7\ln (x) - 3\ln(1-x) \Bigg]$$ $$\longrightarrow \frac{2}{3(x-3)} - \frac{7}{x} + \frac{3}{1-x}$$Note that $\ln(8)$ is a constant and therefore its derivative is zero.
 
Example 10$$\frac{d}{dx} \, \log \left( (x-1)^3 (8-9x) \right)$$
Show solution
$\blacktriangleright$ We have to be a little careful here because this isn't a natural log, but a log base $10$. Therefore we need to make sure the factor $\ln(10$ appears in the denominator of our answer.First, as with any product log argument, let's break this up using log rules:$$\log \left( (x-1)^3 (8-9x) \right)$$$$=\log \left( (x-1)^3 \right) + \log (8-9x)$$$$=3\log (x-1) + \log(8-9x)$$Now, taking the derivative will be much better for us.$$\frac{d}{dx} \, \log \left( (x-1)^3 (8-9x) \right)$$$$\longrightarrow \frac{d}{dx} \, 3\log (x-1) + \log(8-9x)$$$$=\frac{3}{x-1} \cdot \frac{1}{\ln(10)} + \frac{-9}{8-9x} \cdot \frac{1}{\ln(10)}$$$$=\frac{3}{\ln(10) (x-1)} - \frac{9}{\ln(10) (8-9x)}$$
 
Example 11$$\frac{d}{dx} \, \ln\left( \left(x^3 + 1\right) \right)$$
Show solution
$\blacktriangleright$ This one straight up requires the Chain Rule.$$\frac{d}{dx} \, \ln\left( \left(x^3 + 1\right) \right) = \frac{3x^2}{x^3 + 1}$$
 
Lesson Takeaways
  • Know how to take derivatives of bare log functions of any base
  • Handle the derivative of the log of $ax+b$ like a bawss
  • Recognize that complicated log expressions can be manipulated into a series of simpler ones that are each manageable to differentiate
  • Now or later, manage applying the Chain Rule to log derivatives

Lesson Metrics

At the top of the lesson, you can see the lesson title, as well as the DNA of Math path to see how it fits into the big picture. You can also see the description of what will be covered in the lesson, the specific objectives that the lesson will cover, and links to the section's practice problems (if available).

Key Lesson Sections

Headlines - Every lesson is subdivided into mini sections that help you go from "no clue" to "pro, dude". If you keep getting lost skimming the lesson, start from scratch, read through, and you'll be set straight super fast.

Examples - there is no better way to learn than by doing. Some examples are instructional, while others are elective (such examples have their solutions hidden).

Perils and Pitfalls - common mistakes to avoid.

Mister Math Makes it Mean - Here's where I show you how teachers like to pour salt in your exam wounds, when applicable. Certain concepts have common ways in which teachers seek to sink your ship, and I've seen it all!

Put It To The Test - Shows you examples of the most common ways in which the concept is tested. Just knowing the concept is a great first step, but understanding the variation in how a concept can be tested will help you maximize your grades!

Lesson Takeaways - A laundry list of things you should be able to do at lesson end. Make sure you have a lock on the whole list!

Special Notes

Definitions and Theorems: These are important rules that govern how a particular topic works. Some of the more important ones will be used again in future lessons, implicitly or explicitly.

Pro-Tip: Knowing these will make your life easier.

Remember! - Remember notes need to be in your head at the peril of losing points on tests.

You Should Know - Somewhat elective information that may give you a broader understanding.

Warning! - Something you should be careful about.

Return to Lesson