AP Calculus AB — Logarithmic Differentiation and Derivatives of Logarithmic Functions Corrected lesson transcript ## 0:00 — Where logarithmic derivatives fit [0:05] Oh, we know how to find the derivative of all polynomials. And why do we know how to [0:11] find the derivative? Or what rules do we use today? Power rule and then some different [0:20] It takes care of polynomials. [0:25] And then rational functions. [0:31] Why are we able to do [0:32] rational functions now? Because it's a quotient rule. [0:38] Radical functions. [0:42] Like y equals the square root of [0:44] x squared plus three or something. [0:47] both by the power rule and then because of the chain rule: polynomials, rationals, [0:58] radicals, exponentials, okay we proved it for the function e to the x and then we [1:10] did something the other day because of the chain rule for any exponential [1:14] of function. And of course, what's the derivative of this? [1:19] b to the x. What is the derivative of this? [1:23] B to the x times ln of the base. [1:28] All trig functions. [1:31] We prove for sine and cosine, and then we use [1:34] quotient rule for tangent. C tan, cos c tan, [1:38] c tan. What functions are we still missing? [1:43] that we don't know how to find the derivative of. We kind of did piece-wise, we just have to break it up into different pieces. [1:53] We have not done any logarithms. And then the only other type we're going to learn as well is inverse trig. ## 2:06 — Start with the natural logarithm [2:06] So today we're talking about the derivative of logarithms. [2:14] So let's talk about this function, our favorite logarithm. [2:21] What is the base of this logarithm? [2:26] No, no. [2:27] e. [2:30] Yes. [2:32] If it's just log, what's the base? 10. [2:39] ln, the natural log, is log base e of x. [2:42] of x. [2:46] If we start with the definition, [3:09] Can we manipulate this at all? [3:22] What can we do with this? [3:28] Uh oh. [3:33] What is the difference of two logarithms? [3:41] It is one logarithm, and inside we divide. [3:45] ln of x plus h over x. [3:58] Is that going to help at all? [4:02] We play in zero for h. We get ln of x over x, which is ln of one. [4:09] What is ln of one? [4:14] 0 over 0. That didn't help much. [4:20] We could do this. [4:35] Now, what can I do with the coefficient of a logarithm? [4:47] We can, because it is one over h. [4:49] It's not a constant. [4:51] But it is a coefficient of a logarithm. [4:57] This can become the power of the inside. [5:25] Did this help at all? [5:39] Any ideas now? [5:40] Now what if we plug in zero? [5:46] Wait, is this an x? [5:47] Is this an x? Sorry, is that what you were talking about? Thanks. [5:55] As h goes to 0, this goes to x over x which is 1. [6:04] And what does that go to? [6:07] 1 over 0 goes to either infinity or negative infinity. What is 1 to the infinity or 1 to the [6:20] negative infinity? This is an indeterminate form. Okay, long story short, this is not [6:32] gonna work but it was a good review of rules of logarithms. Difference of logs [6:39] is one log with quotient coefficients to become exponents but anyways long search [6:47] yeah it's not gonna work so we gotta try something else let's go back to the [7:04] So, before you learned about logarithms, what did logarithms, when did we come up with logarithms? ## 7:11 — Logarithms as inverse functions [7:11] Logarithms are inverses. [7:15] We knew any exponential looks like this, right? [7:19] Some would depending on the base. [7:27] This was a one to one function. [7:29] What's a one to one function? [7:34] It's a function. How do we know that there's a function? [7:40] It's a vertical line test. Then it's a one to one [7:44] function if it passed the vertical line test and it passes the horizontal. [7:50] There's only going to be for every input there's only one output and never [7:57] repeats the same y-value. Okay in every inverse function sorry I just gave away [8:07] the answer. Every one to one function is guaranteed to have an inverse. [8:17] If we reflect about the line it's this. This is the inverse of B to the X. And we just [8:24] call this function a log with the base, wherever the base B is. Does this ring a bell? I don't [8:35] No. What is an inverse functional? [8:44] It is simply if we have some ordered pair in F, what is in F inverse? [8:54] B, A. It's literally just all the ordered pairs. [8:57] way. Okay. And that's why it was a reflection about the line y equals x. Okay [9:07] and then inverses have a very very important property. What's the most [9:13] important property of inverses? You compose a function and its inverse and [9:24] And you end up with x whatever you started with there and vice versa [9:37] Okay [9:42] This is very important if [9:45] We have to inverse something [9:48] Okay, so our function e to the x and [9:53] ln of x are inverse functions. [10:02] That tells us e composed with ln of x is equal to x, [10:15] ln of e to the x is equal to x. [10:23] We agree with that [10:26] Okay ## 10:34 — Derive the derivative of ln x [10:34] So let's go back to this [10:43] I'm gonna plug both sides of this equation into our function e to the x [10:49] So the left-hand side becomes e [10:53] to the y and the right hand side is [11:01] e to the ln of x [11:08] And e to the ln of x is x because they're inverse functions [11:17] Okay, sometimes we call this the exponential form and call this the logarithmic form. [11:25] Right, it's literally if y equals e to the x, remember this is how we found inverses, [11:34] you just switch the ordered pairs, x equals e to the y, which is the same thing here. [11:40] Okay, so this is exactly the same thing as this. [11:51] Just written two different ways. [11:55] Okay, now we're going to take the derivative of this using what kind of differentiation? [12:11] implicit because now we have functions on both sides of the equation. We're using implicit [12:17] differentiation. And we are looking right we're looking for the derivative of this which is dy [12:26] dx. So we're going to take the derivative with respect to x here. So implicit with [12:41] respect x. And the derivative of e to the y is e to the y times the derivative of our [12:58] inside function y, what is the derivative of y? [13:04] dy dx. [13:07] Okay, that's the derivative of the left side. [13:12] Derivative of x is either dx dx or just the number one. [13:24] And then I solve for dy dx. [13:27] I get 1 over e to the y and what is oops [13:40] What is e to the y equal to? x. dy over dx is 1 over x. [14:05] derivative of the natural log turns out to be this rational function. [14:13] Okay, this is very important we need to memorize it. ## 14:35 — Differentiate logarithms with any base [14:35] Okay, so now we know the derivative of the natural log. What about for any logarithm? [14:42] Let's say y equals log base b of x. We're gonna do the same exact process, except [14:58] without ease. What do we do first? [15:13] Yeah we need to change it from logarithmic form to exponential form. So [15:20] So I'm going to go B to both sides. [15:38] B to the log base B of X is X, [15:43] because they're inverse functions, [15:45] composed through inverse. [15:47] So this is the same function. [15:50] As this so now we're going to differentiate using implicit differentiation [16:03] Derivative of B to the Y is B to the Y times [16:13] Ln of the base I think we talked about that at the very top [16:24] derivative of any exponential function is the same function times ln of the base. Then [16:35] we multiply by the chain rule by the derivative of the inside. The derivative of y is dy over dx. [16:45] So that's the derivative of the left side. [16:47] The derivative of the right side is 1 or dx over dx. [16:53] And we solve for this. [17:10] And then, B to the Y is simply a... [17:30] And there it is. [17:33] The derivative of any logarithm with any base is simply 1 over x times [17:50] the natural log of the base. Which really this is the coefficient of the x but we [17:59] usually write it like that. [18:04] of any logarithm. [18:16] So what is the derivative of log of x? [18:28] What's the base? There's no base here. 10. It's gonna be 1 over x times the [18:40] natural log of 10. Easy. [18:55] Okay, let's do some more ## 19:18 — Apply the chain rule inside logarithms [19:18] Okay, what role do we have these? [19:24] We're going to use lots of the big ideas chain rule. [19:30] We got a function sine of x plus x cubed inside another function log base 4. [19:35] So this is my u. [19:41] What is the derivative of log base 4 of u? [19:49] 1 over u times ln of 4, but what is u equal to? [20:05] sine of x plus x cubed times [20:13] the natural logarithm of 4. [20:16] Now we've got to multiply by the derivative of this. [20:24] By the chain rule, the derivative is cosine of x plus 3x squared. [20:39] We write it as one fraction. [21:04] So [21:06] Again, so if there's anything inside the logarithm, that's our U. It's 1 over U times [21:13] ln of the base times the derivative of the inside U. By the chain rule. Let's try some more. [21:44] So we got a function inside a function. [21:48] What is the derivative of ln of u? [21:52] One over u. [21:56] Times the derivative of u. [21:58] We have x to the 7th is 7x to the 6th. [22:09] And what does that simplify to? 7 over x. [22:19] Sorry, 7 over x. [22:33] We could have done this one other way. How could I have changed this function? An exponent inside a [22:42] logarithm becomes a coefficient. Now we don't need a chain rule, the constant multiple rule. [22:54] It's 7 times the derivative of ln of x which is 1 over x and you're done. [23:13] Most of the time in this class we're really just going to deal with the natural log to [23:18] log base 4 or some other base. But not always. [23:24] And you can always change bases too before you [23:27] want it. So for like this, we could have [23:30] used the change of base formula. [23:34] What would have been the change of base formula? If we want to use the natural log, [23:39] it's ln of the inside [23:44] divided by [23:47] ln of the base. [23:51] And then this is just the coefficient. [23:53] one over ln 4 times ln of sine x plus x cubed. [23:59] Anyways, and then if you differentiate this, [24:02] you end up with this times... [24:05] Oops, that's a 4, right? [24:09] Times 1 over ln of 4, and you get that same thing. [24:16] Okay, let's try another one. [24:30] Okay, you definitely have to use the chain rule. [24:36] Derivative of ln u is 1 over u times the derivative of 5x plus 6. [24:49] Five. ## 25:15 — Compare ln x and ln absolute x [25:15] What kind of function is this? [25:20] It's a piecewise. [25:24] Uh oh. Anything involving absolute value is a piecewise function. [25:37] It's going to be ln of x, if what? [25:42] if X is greater than zero and it's going to be if X is less than zero, Ln of [25:53] negative X, oops, get it right this inside is the definition of the absolute value. [26:03] What is the domain here? [26:11] All real numbers [26:12] except for [26:14] zero. Unlike [26:21] this function [26:22] just ln of x, what is the domain here? [26:29] Uh oh. [26:30] Only positive numbers. [26:34] Okay, right, we talked about the graph of this already. Ln of x looks like that. [26:50] What does the graph of this look like? [26:55] To the right of zero, it is ln of x. [27:00] What does this look like? [27:05] This is like that graph like reflected on the [27:09] y axis like in the classes. That's correct. [27:13] And how'd you know that? [27:15] Okay, that's a good guess. [27:19] A negative in front of an x inside a function reflects about the y axis. [27:26] For example, [27:27] If you plug in negative 1 for x, you get ln of negative negative 1, which is ln of 1. [27:38] a1, ln of 1. [27:39] So it just basically reflects all these values. [27:42] Anyways, so to find the derivative of a piecewise, what do we have to do? [27:52] Take two separate derivatives. [27:53] So let's start with this one. If x is greater than 0, then f of x which equals [28:03] ln of x equals ln of x. And the derivative would be, derivative ln of x is 1 over x. [28:25] Right now we have f prime of x is 1 over x if x is greater than 0. [28:37] And then if x is less than 0, f of x equals ln the absolute value of x. [28:49] Since x is less than zero, our function is this. [29:07] Now when we take the derivative, we've got to use the chain rule. [29:10] So, the derivative of ln of u is 1 over u, 1 over negative x times the derivative of [29:23] the inside derivative of negative x, negative 1, just 1 over x. [29:40] Since it's the same, we just write it as one thing. [29:47] F' of x is simply 1 over x. [29:58] And we already know that domain, all numbers except for zero, because you can't plug in [30:04] zero there. [30:11] So, the derivative of ln x is 1 over x. [30:20] The derivative of ln of the absolute value of x is also equal to 1 over x. [30:33] So what's the only, actually let me write it differently. [30:46] Same story thing. [30:59] So what is the difference between these two then? [31:07] The domain is the difference. [31:14] What is the domain of this? [31:19] From 0 to infinity. [31:21] The only positive numbers. [31:25] That tells us the domain of this. There are no slopes of tangent lines to the left of zero. [31:34] The domain here is also zero to infinity. [31:41] This is the graph of ln x and this is the graph of its derivative, 1 over x. [32:01] Here the domain is all numbers except for zero: negative infinity to zero, union zero to infinity, [32:15] which is also the domain of this. [32:30] Okay. [32:35] Okay. [32:36] Ln of the absolute value of x. [32:41] Looks like this. [32:45] and this is this which exactly the same on the right hand side over here the only difference is [32:58] We have a different domain. [33:00] Okay. So when we're finding derivatives, even though the derivative is 1 over X here, [33:14] the domain is restricted. [33:16] It's not the domain of this. [33:18] The domain is only positive numbers because the domain [33:20] of the function is only positive numbers. [33:23] So that is very important. If the domain is not all real numbers for the function, the domain is not all real numbers for the derivative. [33:32] It's maximum of whatever the domain of the function is. [33:38] The distinction between these two is going to be very important in several months when we're talking about antiderivatives. [33:52] What are antiderivatives? Antiderivatives are you're given a derivative and we want to find [34:00] a function whose derivative is that. Okay, and this is gonna be very important later. [34:09] But the main point of this is the domain of the function is also the most possible domain [34:19] of this right when I say most possible like the square root of X the derivative [34:28] is 1 over 2 square root x. The domain here is zero to infinity. What is the domain [34:43] here? Zero to infinity, not including zero. Okay, so sometimes the numbers in the [34:54] domain go down, right? Now we're missing one number. But anyways, my point was the [35:07] domain of the function is at most the domain of the derivative. I don't know if [35:12] I'm saying that quite right but it can be more restricted like it is here. [35:26] Okay one more thing. ## 35:39 — Differentiate x to the 3x [35:39] I told you your function. [35:53] Is this a power function? [36:00] Anyway, if that's the case, we're going to use the power rule. [36:06] What is the definition of a power function? [36:12] X to any power. And the power has to be any number, any real number. So is this a power [36:22] function? Here is a variable, it's not a real number. So it's not a power function. So we [36:35] We can't use power rule. [36:42] Is it an exponential function? [36:50] So for an exponential function, what does the base have to be? [36:56] Greater than zero and not equal to one. [37:03] Is this an exponential function? [37:05] No. No, why? [37:09] Because the base is not a number. [37:14] So this is neither a [37:16] power function or an exponential function. So we can't use [37:21] the power rule or we can't use the rule for derivative of exponential function. [37:26] So what in the world are we going to do? [37:33] How do you [37:35] Okay, so we can't use any of the rules that we know [37:40] because it's neither of those type of functions. [37:43] So we're gonna first manipulate the function [37:45] or the equation and then take derivatives. [37:50] And as we said, we're gonna start [37:52] by taking the natural log of both sides or any logarithm. [37:59] We always choose the natural log [38:00] because that's the simplest derivative. [38:03] So we take the natural log of both sides. [38:17] And then what can I do with this? [38:22] It becomes a coefficient. [38:39] Now here we just got some function. We don't have to take the derivative of ln now. Here we got a product. We're going to use the product rule. [38:49] And we know the derivative of ln of x. So since there's functions on both sides, what are we going to use? [38:56] implicit differentiation. [39:06] The derivative of ln y is [39:10] 1 over y times the derivative of y, which is [39:18] dy dx. [39:22] Okay, that's just really the left side. [39:27] Now, the derivative of the right side, we need the product rule. [39:37] So, derivative of the 3x is 3. [39:45] The [39:45] derivative of 3x is 3, and the derivative of ln x is 1 over x. [40:03] These happen to simplify, right? Plus 3. [40:07] And we're trying to find dy dx, the derivative. [40:12] So we solve for this. [40:23] Times y. [40:27] Except now we don't want x's and y's. [40:33] What was y equal to? x to the 3x. [40:40] So. [40:53] And there it is. [41:08] Okay, so when are we going to do this? [41:17] First take the natural log. [41:25] Whenever you have a variable both in the base and in the exponent. [41:32] Because it's not a power function, it's not an exponential function. [41:35] So this is called logarithmic [41:40] I spell logarithmic. [41:49] I'm blanking. [41:53] Logarithm. [41:57] There we go. [42:00] Differentiation. [42:12] Use whenever [42:17] there is a variable [42:27] And both the base and the exponent. [42:41] And all you do is start by taking logs of both sides [42:57] and then use implicit differentiation. [43:21] Let's try another one. [43:40] Let's see what this function looks like. ## 43:58 — A variable base and exponent [43:58] It is kind of cool. [44:02] Why are we missing a bunch of gaps in it? [44:10] So, there's definitely some asymptote right here, but there is no, the function is not [44:16] defined right here. [44:18] It is not defined from pi to 2 pi. [44:27] Why is that? [44:34] What's that? [44:38] It has to do with the [44:42] We cannot have a negative base. [44:51] Oh. [44:53] We can't have negative numbers in a base. [44:57] Like, negative numbers in a base. [44:58] 4 to the power of x is not an exponential function. The base has to be positive. [45:03] So long story short, [45:07] whenever sine is a negative number, the function doesn't exist. [45:12] That's why there's a bunch of gaps. [45:15] So, let's find dy by dx. [45:24] The derivative. And we're going to have to use logarithmic differentiation. Why is that? [45:33] There's a variable in the base and there's a variable in the exponents. Okay. Can't use the power rule. [45:44] can't use the exponential rule. So first step is take the log of both sides and [46:00] what happens it will be do this exponent can become the coefficient [46:12] Okay, so it's the same function as written differently. [46:20] And now we differentiate using implicit. [46:29] The derivative of ln of y is 1 over y times the derivative of the inside, which is dy [46:36] dx. [46:41] Then we've got a product rule. [46:49] The derivative of cosine is negative sine, times ln of sine x, plus cosine x times [47:07] the derivative of ln of sine x, which is one over sine x times cosine x. [47:50] And then again, we're solving for dy dx. [47:53] We multiply both sides by y. [48:18] And then we replace Y with where it was, which was what? [48:21] sine x raised to cosine x. There it is. [48:36] functions. We've never even thought about before. And when do we use logarithmic differentiation? [48:51] Variable in the base and a variable in the exponent. You have to use it or it's the only [48:57] option. Okay you could use logarithmic differentiation for other functions. Okay for example, and ## 49:07 — When logarithmic differentiation is optional [49:07] wouldn't do this but let's say we have this sine of x to the fourth power we [49:19] would normally just use the chain rule. [49:27] You get 4 sine cubed x times cosine x. [49:34] It's easier. You could use logarithmic differentiation by first manipulating the equation. [50:04] You have to use implicit differentiation, so 1 over y times dy dx is simply 4 times [50:14] derivative of ln assigned. [50:17] For ln of u would be 1 over u times the derivative of sine and cosine. [50:31] over sine of x times y. What was y equal to? [50:40] sine of x to the fourth. [50:55] And then we can simplify this. [51:00] sine of x [51:01] divided by, or sine of x to the fourth, this becomes [51:04] sine of x cubed. [51:08] We have four, [51:10] cosine of x times sine of x cubed, which is this right here. It's a long story short. You could use it for other problems we rarely ever do. Once or while it makes things easier. [51:31] It definitely did not make it easier here, right? [51:36] But you could use logarithmic [51:39] differentiation. You have to use it [51:41] whenever you've got a variable both in the base and in the exponent. [51:47] Okay, any questions on this?