 Hi everyone. Welcome to this lesson on the derivatives of logarithmic functions. We're going to start with a graphing calculator exploration. So if you grab your calculators, we're going to discover where the derivative rule for natural log of x comes from. So on your calculator, we're going to graph natural log of x and we'll just go ahead and zoom six to create a standard graph. And we're going to take a look at different x values and see if there's some kind of relationship between the derivative value that we find by using the calculator's features and the chosen x value. So we'll start easy. We'll start with using x equals one. So what we want to do is use the calculators built in features to find the derivative of this function when x equals one. So remember you can do that by doing second trace. Go down to number six, dy dx, and simply type in one. So we find that the derivative value of y equals natural log of x when x equals one is approximately equal to one. So let's try another one. Let's try when x equals two. So we'll do second trace again down to number six. And just type in two and hit enter. So we find that the derivative at x equals two of the function y equals natural log of x is approximately a half. So let's try yet another one. Let's consider when x equals a half. And in this case, we find that when we consider x equals a half on the graph of y equals natural log of x, the derivative value at that particular x is two. So hopefully you're starting to see a connection between the chosen x value and what the derivative value is. Can you take a guess? So let's try one more and see if your guess is correct. Do second trace down to number six. We'll try x equals four this time. So if you've made a guess as to what the relationship might be, don't hit enter yet. See if you think you know what the derivative might be. And the derivative in this case is approximately point two five. So hopefully you are noticing that the relationship is that the derivative value, the numerical value of the derivative and any chosen value of x, is always the reciprocal of that x value. So if that's what you were thinking, good job. You were correct. So that really becomes our rule. The rule for the derivative of natural log of x is simply going to be one over x. Now to account for the chain rule, if you were to have u as a function of x, then the derivative is going to be one over u times the derivative of u. So we have a bunch of practice problems lined up, so you'll get a lot of practice in doing that. Now one thing to remember, though, is that the domain of the natural log function is x greater than zero. Take a peek back at your calculator on the graph, then you'll see that's true. So oftentimes what you'll see are expressions of the form natural log of absolute value of x. So maybe we need to consider what the derivative rule for that situation might be. If instead of just having natural log of plain x, if it's natural log of absolute value of x. So to figure that out, let's consider what this function would look like if we were to write natural log of absolute value of x as a piece function. So, so long as your x's are greater than zero, then the rule simply will be natural log of x, because if that x value in here is a positive number, then, you know, the absolute value bars don't really matter. Really, the only time they matter is if it's a negative x. So in those cases in which our x's are less than zero, then we really need to be doing natural log of the opposite of x. Remember that by definition, you cannot do natural log of zero, so that's why none of these conditions are or equal to. So let's go ahead and take the derivative of that piece function. Using the rules we just learned. So derivative of natural log of x, as we just learned, is 1 over x. And derivative of natural log of the opposite of x, this is where the chain rule comes into effect. So we'd have 1 over negative x, but then remember we need to multiply by the derivative of negative x. So that's going to be negative 1. So that's really just 1 over x, because you have the negative times negative makes it positive. So conclusion, more or less the story, it's really the same rule as just plain natural log of x. The derivative is still going to be 1 over x. It's almost that the absolute value bars don't matter. So that's one big thing to keep in mind that regardless of whether you're presented with something of the form y equals natural log of x or y equals natural log of absolute value of x, it is still the same derivative rule. So let's try some practice problems. And all we want to do is find the derivative of each one. So this is a case, the first one, in which it's a chain rule problem because we have natural log of 2x. So this would be like your u. All right, and u is a function of x. So our derivative is going to be 1 over the argument, 1 over 2x. But then we need to multiply by the derivative of 2x. Obviously the 2's cancel. So you're left with 1 over x, interesting. And if you think about it, if it was natural log of any number times x, that's how it's going to end up. It's still 1 over x. Now the second one's going to require the product rule of us. So you get to review that a little bit. So we'll keep the x, this x, multiplied by the derivative of natural log of x. So that's going to be 1 over x. Plus, then we'll keep the natural log of x multiplied by the derivative of the plain x. So that's just going to be 1. So in the end we have x times 1 over x. That's 1 plus natural log of x. So the next one is an example with the absolute value bars. And again, from what we discovered, they really just don't matter. Notice that when you do the derivative, it's going to be 1 over u. Notice there's no absolute value bars in the derivative answer. All right, they pretty much just drop out. So we're going to have 1 over cosecant of x, and nice opportunity to review your derivative rules. Remember that your derivative of cosecant is negative cosecant cotangent. When we multiply these, obviously the cosecants cancel out. So you're simply left with negative cotangent. Now the next one, number four, is classic chain rule type of problem. So three comes to the front. Keep the natural log of x. Now it's raised only to the second. Now we go inside and multiply by the derivative of natural log of x. So that's going to be 1 over x. Usually we'll just rewrite it to tidy it up a little bit so we can make it 3 over x times natural log of x, that quantity squared. And that would be our answer. Now along with logarithms, of course, come the laws of logarithms. And there is great opportunity to make use of these on certain problems. Because the laws of logarithms can often be used to simplify the given function before you differentiate. So let's take a look at a few examples of that. So in this first one, we have y equals natural log of x cubed. According to the laws of logarithms, remember that 3 can pop out in front. And we can rewrite this as 3 natural log of x. Well, when you do that, taking the derivative is way easy. Because we know that to take the derivative, we'll keep the 3 as the coefficient, and then we just multiply by the derivative of natural log of x. And that's it. Now the alternative would have been, if you had left it the way it was, to do it as a chain rule problem, you'd have 1 over x cubed. Let me see if I can write it down over tiny here. You'd have 1 over x cubed as the argument, but then you need to multiply by the derivative of x cubed. So that's going to be 3x squared. The 3x squared cancels out with two of the x's down below. You still have 3 over x. So on, you know, this problem, maybe it wasn't so bad to leave it the way it was. But as you soon will see, there are definitely advantages of using the laws of logarithms where you can. So let's take a look at another one. This is another one that, since you're taking the square root, we can rewrite this as natural log of x plus 1, that quantity to the half. But of course, according to the laws of logarithms, that one half can pop out in front. So we have this. Now this is an example where maybe it would be beneficial to rewrite it by using the laws of logarithms first. Because otherwise, when you do the derivative leaving it as it was, you definitely have a chain rule problem, and it's almost like a few embedded chain rules, because you'd have to think of it as 1 over that square root, but then times the derivative of that square root quantity. So you'd have a few chain rules embedded in each other. So this is maybe a better example of why it would be beneficial to rewrite the given problem by using the laws of logarithms. It also enables you to get your answer simplified better, which will typically be the desired result. So when we go to find our derivative then, the one half stays as the coefficient. We're going to have 1 over x plus 1. That's kind of all you can do. I mean you could distribute the 2 times that quantity x plus 1 if you wanted to. Make it 1 over 2 x plus 2, but that's about all you could do. Now I think the next example though is a great one to illustrate why you would definitely, without a doubt, want to use the laws of logarithms. Because that would be a nasty bugger to leave it as it is. I mean imagine if you left it like this, you'd have 1 over that big ugly fraction thing, but then you need to multiply by the derivative of that big ugly fraction thing, which would require a quotient rule first of all, but embedded in there, you're going to have product rule up in the numerator plus a couple chain rules thrown in. So this is one where absolutely, positively, you would want to take and use the laws of logarithms to simplify this without a doubt. So what we're going to do is rewrite this then by using those laws of logarithms. Remember the fact that you have this quotient, you are going to have natural logs that are subtracted at some point, but we do need to break up that numerator, and since in the numerator, we have x times that quantity. Remember when we break those apart with the logarithms, they're going to be added. So we have natural log of x plus this exponent 2 is going to pop to the front of the logarithm with the x squared plus 1. So we have 2 natural log of the quantity x squared plus 1. Then minus, we have the denominator part. Again, it's a square root, so you can think that as a one-half exponent that will come to the front of that logarithm. So perhaps if you are a little rusty on the laws of logarithms from algebra 2, you might want to go back and review those, because you definitely need them for this. So now you just go term by term and find the derivatives that way. So for the first term, derivative of natural log of x, of course, is just 1 over x. All right, the second term will keep the 2, this one here, multiply that by 1 over the x squared plus 1, but then of course we need to multiply by the derivative of x squared plus 1, so that would be 2x. Minus, now we keep the half, times we'll do 1 over the 2x cubed minus 1, and then multiply by the derivative of that argument, the 2x cubed minus 1, so that'll be 6x squared. So we could simplify a little bit just to tidy it up. Typically, no, you will not have to worry about combining these three fractions by finding common denominators. So in the middle, we can do 2 times 2x, so it makes it 4x. Over x squared plus 1 minus, we can cross-cancel this half with the 6x squared, so we have 3x squared in that numerator, over 2x cubed minus 1, and that would be your answer. That's how you'd leave it. But definitely easier than the alternative of working with it the way it was. So now let's consider, this was all obviously natural log problems, let's consider the cases in which we have bases other than E. So we're considering to find the derivative of log base B of x. B is a positive real number, cannot equal 1. So let's kind of go through a little, like let me give you the rule first, and then we'll kind of go through a little proof of it. So the rule basically is, and we will have a follow-up to this using the chain rule, but if you're just talking about log base B of x, then the derivative of that is going to be 1 over the natural log of B times x. All right, so let's go through a little mini proof. So let's start out with considering the equation y equals log base B of x. And since we've already discovered the rule for natural log of x, let's use the change of base formula to rewrite this. So if we were to do that, we'd have, remember how the change of base formula goes, we're going to change it to a base of E so we can make use of those natural log rules. We would have natural log of x over natural log of B in accordance with the change of base formula. Now remember B is a number. Remember that. So therefore natural log of B is a number. So if we think about this, really what, you know, if we think about this as natural log of B is a number, we could think of it as 1 over natural log of B. That's kind of like a coefficient because that's going to be a numerical value times natural log of x. So if we find the derivative of that, we would keep that coefficient, that numerical coefficient, and then we just need to multiply really by the derivative of natural log of x, which is 1 over x, which is this rule right up here. So it's almost like this rule comes from the rule we discovered for natural log of x by using the change of base formula. Now, should it be a case in which instead of just doing log base B of x, you have log base B of some function of x, so we're doing log base B of U. It's going to be 1 over the natural log of B times U, and then you need to multiply by the derivative of U. One thing to keep in mind, if this was a natural log problem, all right, you'd have to remember this part here. In a natural log, remember the base is E. This natural log of B would be natural log of E, which we know to equal 1. So, you know, this whole thing would be 1, and you still have 1 over U. All right, so it's almost like, you know, when you compare the two rules for a natural log and logarithms other than base E, the rules hopefully do make sense, you know, there's a lot of similarities between them. So we're going to finish up with a few more examples that will give you some practice in using this rule. So let's find the derivative of the log of cosine of x. Now remember, if there is no base noted, it is understood to be base 10. All right, so when we go to find the derivative for this, remember how the rule goes, it's going to be 1 over, we need natural log of 10, because that's your base, times the cosine of x, your argument from the logarithm. Now you have to multiply that by the derivative of cosine, which is going to be negative sine. So we have negative sine of x over natural log of 10 times cosine of x. Of course, in the denominator, hopefully it goes without saying, commutative property of multiplication, yes, it is fine to write cosine of x in front of natural log of 10. You just need to be careful how you write it, because you don't want it to look like you're doing cosine of x times natural log of 10. Okay, so you might want to maybe use an extra set of parentheses, perhaps. Now of course, though, sine of our cosine is tangent, so we can simplify it further as you should, and have negative tangent of x over natural log of 10. And in terms of the simplifying, it is understood that you would pretty much simplify it as far as you can, do so easily, especially with these. So you'll be making use of trig identities, especially on ones like this. But really, any kind of simplifying, you really should do. Sometimes you'll be able to do a greatest common factor. I think the last one we're going to look at will be like that. So here we have a logarithm with base 2. So remember how the rule is going to go? It's going to go 1 over the natural log of 2 times the argument, so the 3x to the fourth. All right, and then we need to multiply that by the derivative of the argument, the 3x to the fourth. So that's going to be 12x cubed. So we'll simplify what we can. We can cross-cancel the 3 with the 12, and we can cancel the x cubed with one of these. So in the end, we have a 4 up in the numerator over natural log of 2, and you do have this one single x left over. So the last one that we're going to take a look at, this is another logarithm in base 10, and as we talked about earlier, using the laws of logarithms to rewrite it, that becomes something that you just want to get in the habit of looking for, because this is definitely one that you would want to do that to. So we're going to rewrite this first by using the laws of logarithms, which would tell us that since we have the log of a quotient, we're going to separate this out by subtracting the two logarithms. So we have log of x plus 1 minus log of the quantity x squared plus 1. So we're just going to do the derivative of each of the two terms, and remember this is base 10 understood. So we'd have 1 over natural log of 10 times x plus 1. The derivative of that is just 1, so we don't really have to worry about that, minus 1 over natural log of 10 times x squared plus 1. Now we need to multiply by the derivative of the x squared plus 1, so that'll be 2x. So this is a case in which you can actually do a greatest common factor. Notice you have a 1 over natural log of 10 in each of the terms, so we could factor that out as our greatest common factor. And then what we have left over, we have 1 over x plus 1, minus, and we can put the 2x up in the numerator over x squared plus 1. And that would be really all you can do to simplify it. I mean, you typically will not be required to combine those two fractions and actually subtract them by finding common denominators, so leaving it like this would be most sufficient. So hopefully that walkthrough of the derivative of logarithmic functions was helpful.