 Welcome back to our lecture series Math 12-10, Calculus I for students at Southern Utah University. As usual, I'll be a professor today, Dr. Andrew Misseldine. Lecture 20, we're going to continue to talk about some so-called shortcuts in terms of calculating derivatives of functions. Much like in the previous lecture number 19, we learned about the power rule which we can use to compute the derivatives of power functions. In lecture 20, we're going to talk about the product and quotient rules. This video will focus on the product rule, and the next video in lecture 20 will have to do with the quotient rule. So let's first talk about why there is a need for product rule. That is to say, in the previous lecture, we learned about a sum and difference rules that if you want to take the, if you have a sum of two functions, you know, f of x plus g of x, and you take their derivative, then it turns out just be f prime of x plus g prime of x. And this follows from basically limit properties. That is the derivative of a sum is a sum of derivatives. Why does that not work for products? Well, we'll see that in this example right here. So consider the function f of x and g of x. f of x is given as two x plus three, and g of x is given as three x squared. If we take the derivative of f by the rules we've learned previously, its derivative will be two, and the derivative of g would be then a six x, again, by the product rule linearity of the derivative. And so if we compute the product of f prime and g prime, this is just gonna look like two times six x, which gives us 12 x. On the other hand, if we actually multiply out f of x by g of x, notice this will give us a two x plus three times a three x squared, for which we can just distribute the three x squared throughout, we end up with a six x cubed plus nine x squared. And so from here, if we calculate the derivative, that is if we take the derivative of f of x times g of x, we're gonna take the derivative of this six x cube plus nine x squared, which again by the power rule and the like, we're gonna end up with an 18 x squared plus an 18 x, for which when you compare that to the 12 x we had before, we can see that's grossly inaccurate. It doesn't give us the correct derivative. So it turns out the derivatives of products are a little bit more complicated than just multiplying the product of the derivatives. So it turns out the correct product rule is gonna be given by the following formula. If f and g are both differentiable functions, then the derivative of f times g will look like the function f times the derivative of g plus the function g times the derivative of f. So the way you look at it, it's a sum of two products. So there's gonna be some two products involved in the product rule. And with each of those products, you have the original function and a derivative, the original function and the derivative. And you look at the two combinations. So you have f and the derivative of g, and then you have g and the derivative of f, like so. That's the product rule. Let's see why that is. Well, in order to prove this formula, we're gonna look at the definition of the derivative as a limit of a difference quotient. But before we do that, let's look at the following algebraic calculation. Just consider the quantity f of t times g of t minus g of x and add to that g of x times f of t minus f of x. This quantity will be important to us in just a second as we look at the difference quotient in consideration here. So let's just consider its simplification. All we know about t and x is there's two separate variables right here. If you distribute f of t, you're gonna get f of t times g of t, subtract from that f of t times g of x, okay? And similarly, if you distribute the g of x, you're gonna get g of x times f of t minus f of x times g of t. Now you'll notice there are some like terms going on here. We have an f of t g of x and we have a g of x times f of t. Those are gonna cancel out, giving us simply just an f of t times g of t minus an f of x times g of x. Now I should point out to you that when you talk about the function f times g evaluated at x, that means you take the output of the f function and you times it by the output of the g function. So f of x times g of x is just f times g evaluated at x. Likewise, f of t times g of t is just f times g evaluated at the parameter t like so. So be aware that this quantity right here is equal to this one, just by that algebraic simplification. Now let's go to the difference quotient here. The derivative of f times g evaluated at x here, the derivative with respect to x, this is the limit of the difference quotient. And this difference quotient is gonna look like the limit as t approaches x of this slope formula, f g of t minus f g of x all over t minus x. So this is the version of the derivative that looks more like that slope of a secant land that is we're taking the limit of the secant slopes there. Now you'll notice this thing in the numerator that we see here is exactly this friend right here, f g of t minus f g of x, for which by the computation we did above, we can make this substitution in right here, that becomes this, we get this more expanded numerator. This expanded numerator is gonna be more useful for us in terms of our limit properties. So we do have this plus inside of the numerator, we're gonna break it up into two fractions. So we got the limit as t approaches x of f t, g of t minus g of x all over t minus x plus g of x times f t minus f x over t minus x right here. So we have two different summands inside of the limit. So breaking those into separate pieces, this would give the limit as t approaches x of f of t times g of t minus g of x all over t minus x. And then you're gonna add to it again separately, a separate limit here, the limit as t approaches x of g of x times f of t minus f of x all over t minus x. So limit properties provide that for us. But then when you look at this limit right here, you have a factorization, you have f of t times g t minus g x over t minus x. We can factor this limit into two limits, the limit as t approaches x of f of t and then the limit as t approaches x of g of t minus g of x over t minus x. We're gonna do the same thing for the second limit here as well. We can factor it so that we take the limit of g of x and then we take the limit of f of t minus f of x over t minus x. Why do we do that? Well, when you look at this right here, we have the limit as t approaches x of a difference quotient. This difference quotient is the difference quotient associated to the derivative. And since g is differentiable, this limit will exist and the limit will be g prime of x. This is the derivative. Likewise, this here, we take the limit as t approaches x of f of t minus f of x over t minus x. This is the difference quotient that gives us the derivative of f. And so this will be equal to f prime of x. What about the other two things? Well, this one right here is sort of a curious creature. If you take the limit of g of x as t approaches x, notice g of x doesn't actually depend on t. So as t gets closer and closer and closer and closer to x, who cares? g of x doesn't depend on t. So g of x is constant with respect to t. So as the limit approaches x, g of x will just stay g of x. And so as a constant, you get equal to that one. So the last one I wanna consider is the limit as t approaches x of f of t. This is the most curious of them all because as t approaches x, f of t will change, right? f of t does depend on t. So as you change the input t, that'll change the output f of t. I claim that still is equal to f of x, but for a different reason. The limit as t approaches x of f of t is equal to f of x because f is continuous. A continuous function is exactly those functions for which you can evaluate the function at the value and that'll give you the limit. How do we know that f was t, excuse me, f is continuous? If you go back to the original problem, it's like what do we know that f, f is differentiable? But aha, as we've seen previously, every differentiable function is necessarily continuous. So since we assumed f is differentiable, we know it's continuous. And so that then gives us the product formula we need right here. So let's look at an example of this. Let's use the product rule to compute the derivative of two x plus three times three x squared prime. This function might look familiar somewhere. This is, these are the functions we were looking at before we proved the product rule. So by the product rule we just saw on the previous slide. Well, let's say that this function here is f and let's say this function right here is g of x. Oh wait, that's what we called them earlier. So by the product rule, the derivative here is gonna equal, remember f of x times g prime of x plus g of x times f prime of x. For which if we calculate these things, we see that f of x is just two x plus three, no big deal there. g prime of x is going to be a six x like we saw previously. You then multiply that by of course g of x which is three x squared. And then you times that by the derivative of f which we previously saw was two. Distribute here, we're gonna get 12 x squared plus 18 x and then the next one's gonna be a six x squared. Combining like terms, we add up to get an 18 x squared plus 18 x, which you'll recall that this right here, 18 x squared plus 18 x, this was equal to the derivative we calculated previously which you remember seeing that right here when we did this example. So this formula does in fact give us the correct derivative of the product. Let's apply the product rule to find the derivative of y equals the square root of x plus three times x squared minus five. So by the product rule, we see that the derivative here of y is gonna look like the first function, the first factor I should say, the square root of x plus three, you're gonna times that by the derivative of the second function and then you're gonna take the first factor. If you don't wanna put in that order, that's okay. You could keep it as the square root of the first fact or square root of x plus three is the first factor. Take its derivative times it by x squared minus five x right here. So the thing is when it comes to multiplication and sums, the order doesn't matter, the operation's commutative. So all that you need is you have to have a fact or you have to have products where in each of the products, you're gonna take one of the derivatives. So if you wanna keep them the same order, that's fine. So you have the first and then the second and then the first and then the second. That's perfectly fine. Just make sure that on one of them, you take the derivative of the second and on the other, you take the derivative of the first factor. If you do that, you're gonna be just fine. So let's compute these derivatives here. Rewrite the first factor, the square root of x plus three. I'm gonna write that as a power function because it'll be more helpful with the algebraic calculations that we're gonna follow. So we get x to the one half plus three. The derivative of x squared minus five x will be a two x minus five. And then for the next one, we have to take the derivative here. The square root of x, remember, is x to the one half power. So we get one half times x to the negative one half power. The derivative of the plus three is zero. The derivative of constant just disappears. And then we get an x squared minus five x, right? So we do wanna combine like terms. So we're gonna have to foil these things out. X to the one half times two x will give us a two x to the three halves. Took the one half power plus the first power. Then we're gonna get a negative five times x to the one half. Now let's multiply by the three. Three times two x gives me a six x. Three times negative five gives us a negative 15. And then for the last one, if we distribute the one half x to the negative one half power, we're gonna end up with one half x to the three halves. Notice I took the second power minus one half. And then lastly, you're gonna get a negative five halves times x to the one half power. One minus a half is one half. So let's combine some like terms if we can. Notice there is x to the three halves that's common. There's also x to the one half that's common. So if we combine those coefficients together, I noticed the biggest power of x turns out to be x to the three halves. So we're gonna have two plus a half, which is five halves, x to the three halves, like so. The next biggest power would then be x, x to the first, for which we have a six x. The next biggest power would be x to the one half, for which we're gonna have a negative five half of negative five minus a negative five halves. So that'll combine together to give me a negative 15 halves. Notice five just became 10 over two there times x to the one half. And then the only other thing we have to accommodate for is the negative 15. In which case, I'm just gonna leave the answer like this. If you wanna turn back into square roots instead of the one half power, that's fine. But this gives us the derivative of our function in this situation using the product rule. As another example, let's find the nth derivative of f of x equals x to the e to the x times e to the x here. So the nth derivative, that's, we wanna find higher derivatives. So let's start off with say like the first derivative, okay? So if we take the first derivative, that should be f prime of x. So we need to take the derivative here using the product rule, which would look like x prime e to the x plus x times e to the x prime. If you take the derivative of x with respect to x, that's gonna give you a one, one times e to the x. As we've also previously seen, if you take the derivative of e to the x, that is itself e to the x. I noticed that both of these factors here, both of these products involve e to the x. I could factor it out, give you e to the x. I'm gonna write it as x plus one times e to the x. This is the x that came from there, and then here's the one that came from there. I wrote it in a slightly different order, but you get x plus one times e to the x. That'd be the first derivative. How about the second derivative? We wanna calculate the second derivative here, f double prime. That's just the derivative of the derivative. So we have to take the derivative of x plus one times e to the x, take that prime. Well, we're gonna use the product rule again. We're gonna get x plus one prime times e to the x plus x plus one times e to the x prime. For which x plus one, if you take its derivative, you're gonna again get a one, right? Times e to the x. And then if you take the derivative of e to the x, like we saw earlier, you're gonna get an e to the x. If we factor out the e to the x, that leaves behind one plus x plus one, which combining the ones together, you're gonna end up with a x plus two times e to the x. So, okay, that's the second derivative. It wants to know the nth derivative. Is there a general pattern we can find here? Well, we're getting close to, let's try the third derivative. I think we will build to use some reasoning to figure out what the next term is gonna be after that. If you take the derivative of x plus two e to the x here, again, using the product rule, we get x plus two times e to the x prime. By the product rule, we're gonna get x plus two prime e to the x plus x plus two times e to the x prime. For which the derivative of x plus two, that's gonna turn out just to be a one, then you get an e to the x. And then the derivative of e to the x is just e to the x again. If we factor out the e to the x, we're gonna end up with a one plus x plus two, which putting that all together, we're gonna end up with x plus three e to the x. And so now we wonder what is the nth derivative of this function right here? What's the pattern? And so zooming out so we can see all of these ones together, let's do it this way, you'll notice x plus one e to the x, x plus two e to the x, x plus three e to the x. I should also mention that sometimes we talk about the zero with derivative, that is if you take the derivative of zero times, that's just the original function. So if you don't ever take any derivatives, that's just the original function. The original function could be written as x plus zero e to the x. And so with this in mind, you notice that the derivative always looks like x plus, the nth derivative should look like x plus n to the e to the x. And where did that come from? Well, the idea here is with the product rule, you're always gonna get what you had before, the x plus something times e to the x. Well, when you take the derivative e to the x, something happens. So you have that x plus whatever you had before. But then when you take the derivative of x plus whatever, you're gonna get a one, so you always get an extra e to the x. And so the number of e to the x as you have seems to increase every single time. So we see that the nth derivative of f right here is gonna look like x plus x.