 Welcome back to our lecture series Math 12-10 Calculus 1 for students at Southern Utah University. As usual, I'll be your professor today, Dr. Andrew Missildine. In lecture 26, we're gonna talk about derivatives of logarithms. And this is something we had begun doing in lecture 25 when we were talking about implicit differentiation. We learned how to calculate the derivative of a function if we know the derivative of its inverse function. Well, guess what? Logarithms are in fact inverses of exponential functions. And if we apply that technique to finding derivatives of logarithms, we can actually find them because we know the derivatives of exponential functions. So let's do that right now. Well, just like we did with exponential functions, there's one logarithm that's worth starting with and it's the natural log. It turns out that the natural exponential was somewhat exceptional amongst other exponential functions. So we start off with the natural log right here. So what we're gonna see is that the derivative of the natural log of x with respect to x is equal to the function one over x. Now to see that consider the function y equals the natural log of x. We wanna calculate its derivative but we don't know how to do that yet. So we're gonna switch over to its inverse function if y equals the natural log of x that means e to the y is equal to x. For which then if we take the derivative of both sides that is we're gonna take the derivative of e to the y and we're gonna take the derivative of x in both cases with respect to x by rules of implicit differentiation, the derivative of e to the y will become e to the y because the derivative of e to the x is just itself but then you have to multiply by the inner function, the inner derivative y prime. The derivative of x is gonna be a one because we're taking derivative respect to x and so to get a y prime we're just gonna divide both sides by e to the y. So we get y prime which is the derivative here y prime equals one over e to the y but as we observed earlier e to the y is just an x and so making that substitution in right here we end up with the formula that we expected we get one over x. So the derivative of the natural log of x is gonna be one over x. We can extend this to general logarithms as well. We've seen previously that the derivative of an exponential a to the x, this is equal to the natural log of a times a to the x. This being a generalization of what we saw for e to the x. e to the x is equal to its own derivative which is of course e to the x times the natural log of e. So when it comes to exponential functions in calculus we see that the best base is actually e. e is the free base. For other bases like base two or base seven or whatever you have to pay a tariff. We're gonna see the same thing happening for logarithms here. If we compute the derivative with respect to x of the log base a of x the derivative is gonna be one over the natural log of a times x which if you give it this natural log of a this looks just like the derivative of the natural log it's just one over x but there's a price that has to be paid a natural log of a that tariff has to be paid. And notice that for exponentials you multiply by the tariff for logarithms you divide by the tariff. Logarithms and exponentials are inverse operations so maybe that comes as no surprise that the tariffs will also be inverse operations. One is multiplication, one is division. So how do we see this proof? Well we could just mimic the proof we saw a moment ago that is using implicit differentiation knowing the derivative of a to the x here but it turns out there's an even easier argument involving the change of base formula. If I wanna take the derivative of the log base a of x well I can use the change of base formula to turn this into the natural log. So log base a of x is the same thing as the natural log of x divided by the natural log of a which the natural log of a is a constant. A is a fixed number and so the natural log of a is also just some fixed number. As such we can factor it out of the derivative process and so we just have to compute the derivative of the natural log of x which we saw on the previous slide is gonna be one over x. So we get one over the natural log of a times one over x which when you multiply those together you get exactly this formula right here. So what we now see is a brand new family of functions. We can now take the derivatives of logarithms and so just like every other generation of Pokemon the new generation is now coming out Pokemon exponential slash logarithm which version are you gonna get? We don't know but we have a brand new generation. All of the rules of the game are just like they were before. We still have the product rule. We still have the quotient rule. We still have the chain rule. We have all of the previous generations of families of functions we have. We have power functions. We have exponential functions. We have trigometric functions just to name a few. We're now introducing some new species into our game or if maybe you're into the Pokemon card game. I don't know. We have a new expansion that we can add to the deck. We've already built out a few new cards. That's what we're gonna be doing here. So let's look at some examples. Let's find the derivative of each of the following functions. Let's take f of x to equal the natural log of six x. The chain rule is gonna come into play here, right? Cause six x is this inner function. It sits inside of the natural log that we can see right there. And so using the chain rule combined with the rules we have for logarithms we saw in the previous slides we see that the derivative of f right here well you take the derivative of the outer function first which the derivative of the natural log says you get one over the inner function which is gonna be six x. You then have to multiply that by the inner derivative the derivative of six x which that is gonna be just a six. So we get six over six x simplifying you'll notice the six is canceled out and we end up with just a one over x right here. So the derivative of the natural log of six x is just one over x just like the derivative of the natural log is interesting right? You might have not expected that because after all putting the six inside is gonna cause a horizontal compression of the graph by a factor of six but it turns out that doesn't affect the slopes of tangent lines shocking interesting. Why is that? Well if you use logarithmic properties one way of seeing this from a different perspective is you actually can expand this to be the natural log of six plus the natural log of x. So for logarithms a horizontal stretcher compression is equivalent to a vertical shift up or down which case when you take the derivative the natural log of six as a constant the derivative will be zero so you take the derivative of natural log of x you get one over x. So that's kind of a curious thing you can see there. How about this time if f of x equals the natural log of x squared plus one? Well in this case we still have an inner function it's a little bit more complicated this time we get x squared plus one the outer function is still the natural log of x and so by the chain rule we're gonna see that the derivative of f right here is gonna look like one over x squared plus one that's the outer derivative and then you times that by the inner derivative that is the derivative of x squared plus one. For which the derivative of x squared plus one is gonna be a two x so we see the derivative turned out to be two x over x squared plus one. And so what I wanna illustrate what I wanna say based upon what's illustrated in these examples here is a general pattern. If you have to take the derivative of a function that function looks like excuse me your function looks like y equals the natural log of some u where u is itself a function of x but at the moment unspecified. Then the derivative that is the derivative of y is gonna look like one over u the outer derivative times the inner derivative u prime which when you put that together it looks like u prime over u. So you see this commonly when you work with derivatives involving natural logs the derivative of the natural log of u is u prime over u. So you have the original function on the bottom and you have its derivative in the numerator. Let's apply that in this example here. Let's take c to be the function y equals negative the natural log of cosine of x. So if we calculate the derivative of this time y prime we have to compute the derivative of negative the natural log of cosine of x. Well by derivative properties we can take out the negative sign so because negative times the natural log of cosine of x right here. For which applying this principle right there the derivative would then put a the derivative of the natural log of cosine will put a cosine unchanged to the denominator and then it puts the derivative of cosine in the numerator which is a negative sign of x. Which then if we try to simplify this we have a double negative right negative negative that makes it a positive and then if you have sine over cosine that actually can be written as tangent. So we actually found a function whose derivative is tangent. Just kind of a fun little observation there. And then another example here let's take g of x to equal the square root of the natural log of x. So most things are a little bit different this time. The inner function is actually the natural log this time and the outer function is the square root. Or perhaps it would be a little bit better to think of it as the natural log of x raised to the one half power. So when we compute the derivative by the chain rule we bring down the power we get one half times the natural log of x to the negative one half power this time and then we times this by the derivative of the natural log which is one over x for which you can put that all together as one fraction where you have a one in the numerator you're gonna have a two x times the square root of the natural log of x right there for which we see that the two came from this one half the x came from this one over x and then the natural log to a negative power puts in the denominator. So we see all the pieces right there. What about we use other bases? What if we don't do the natural log? Like if we take the derivative of y equals log of x well you'll notice that the fact that there's no base missing here this is actually understood to be the common log that is base 10. So by the formula we saw on the previous slide y prime is gonna equal one over the natural log of 10 times x. So the only thing different about a different base is you have to make sure to remember to pay this tariff. So since we're working base 10 we have to pay a tariff of log base 10 excuse me a natural log of 10. That's the only difference in the calculation. So how about this one right here? Let's take y equals log base two of 3x squared minus 4x. You have an inner function of a polynomial 3x squared minus 4x. You have an outer function which this time is the log base two the logarithm base two. It's derivative y prime by the rules we've seen before you'll take the outer derivative which will give you one over 3x squared minus 4x but you have to multiply that also by the tariff that is the natural log of two. That's the only thing that changes this time that we're working base two as opposed to the natural log. You have that tariff you have to pay. We still have to pay we have to also compute the inner derivative that is the derivative of 3x squared minus 4x which by usual derivative rules we see that's gonna be a 6x minus 4 and this sits on top of the natural log of two times 3x squared minus 4x like so that's our derivative. We can generalize the principle that we see right here is if your function looks like y is equal to the log base a of u where u is some function of x then y prime is gonna equal u prime over the natural log of a times u. Again, it's just like computing the derivative of a natural log but because it's not log base e it's log base a you have to pay the tariff for not using the currency of calculus which is base e. So as one last example consider and we'll apply this principle here let's take y to be log of two plus sine x this is the common log so it's base 10 again. When we compute the derivative y prime we're gonna end up with the derivative of two plus sine in the numerator. The derivative of two is zero the derivative of sine is cosine so we get cosine of x and then in the denominator we're gonna get the natural log of 10 because we're working base 10 and then we get unchanged the two plus sine of x. So recognizing this general pattern over here we can very quickly compute derivatives involving logarithms.