episode 17 the product rule and the quotient rule so let's review the tools that we have in our differentiation toolbox we have three basic building block rules we can use the definition F prime is equal to the limit as H goes to zero of f of X plus h minus f of X divided by H we have we use that to show that the derivative of a constant was zero and that the power rule says that the derivative of X to the N is n X to the N minus 1 remember n could be any real number so that could be that's how we can do square roots and how we can do things like 1 over X to a power and then we can take those things and combine them with three rules that we have the constant multiple rule the derivative of C F is equal to C F prime that only applies if C is a constant and then sum and difference rules the derivative of F plus or minus G is F prime plus or minus G prime and then last time we had a chain rule very important ones how we differentiate the composition of functions so the derivative of F of G of X is F prime of G of x times G prime of X and it's not exactly the most intuitive thing but it's something that we got to understand so today we will add two more of these combination rules how do we deal with the product of two functions that we know how to differentiate and the quotient of two functions that we know how to differentiate so we'll start with the product so last time we left off with this question we were supposed to identifying any points of inflection that f of X equals four minus x squared to the three halves power may have and well we could find F prime F prime was minus 3x times the square root of 4 minus x squared but we couldn't differentiate that to get f double-prime we need to find our points of inflection we just said f double prime equal to zero but we can't find it yet so we got to think about how we do that so this is the product of two functions that we know how to differentiate all right the first one is minus 3x we can differentiate that and then last time we learned how to differentiate the square root of 4 minus x squared that's a composition function but because we know the chain rule we can do that 1 2 so now we need to talk about how we deal with this product if we know how to differentiate f of X and we know how to differentiate G of X can we differentiate f of X times G of X well let's run through a quick proof here we want the derivative of the product f of X times G of X so it's going to be the limit as H goes to 0 of f of X plus h times G of X plus h minus f of X times G of X divided by H string that's the definition I can add and subtract the term here f of X plus h times G of X I'll do that so that I can regroup them into two forms here I have the limit as H goes to 0 of f of X plus h times G of X plus h minus G of X divided by H plus the limit as H goes to 0 of G of x times f of X plus h minus f of X divided by H and so I see the definition of the derivative popping up in two places there right in the first term the limit as H goes to 0 of f of X plus h well that by itself is just f of X and then what's left over is the definition of G prime so that first term is f of x times G prime of X and then the second term is G of X which doesn't care what H is times the definition of F prime of X and so there we have our formula this is known as the product rule we can take the derivative of f of X times G of X as f of X times G prime of X plus G of x times F prime of X this is the first times the derivative of the second plus the second times the derivative of the first that's the way I remember it we do have of course multiplication in addition here so the order that we do these things in doesn't really matter sometimes I don't do it in this order but I usually do do it in this order so this is the product rule this is how I take the derivative of the product of two functions so let's return to our example what was F prime here F prime was minus 3x times the square root of 4 minus x squared so that's the product of minus 3x and the square root of 4 minus x squared so we use the product rule f double prime of X is going to be the first minus 3x times the derivative of the second so they just thought of spread it down is just the derivative of the square root of 4 minus x squared we'll come back to that in a second plus the second the square root of 4 minus x squared times the derivative of the first the derivative of minus 3x so the derivative of minus 3x that's that's pretty easy it's just the last three but then that first derivative the derivative of the square root of 4 minus x squared but that is a chain rule problem right that is the square root of a function so that would be 1 over 2 square root of the derivative of the square rooting function evaluated at minus 4 x squared the thing that was inside the square root and then the chain rule says I got to multiply by the derivative of the thing that was inside the square root the derivative of 4 minus x squared is minus 2x so there is f double prime the calculus is done we should simplify this I've got in the first term I have a minus 3x times a minus 2x but then I divide that by 2 so I end up with 3x squared over the square root of 4 minus x squared minus 3 square root of 4 minus x squared so if I get a common denominator I can simplify this down to 6 times x squared minus 2 divided by the square root of 4 minus x squared I did this because I wanted to know where it had points of inflection so I should set this equal to 0 so that's going to happen when x squared minus 2 is equal to 0 so that's plus or minus the square root of 2 so those two values give us 3 intervals negative 2 2 negatives two negative square root of 2 square root of 2 and square root of tunity to remember the domain of this function is only the closed interval negative 2t to at both of those endpoints notice that our second derivative is undefined we had local minima there okay so this function is it positive or negative on these three intervals on the first interval negative 2 to negative square root of 2 it's positive on the middle interval negative square root of 2 to the square root of 2 it is negative and then on square root 2 to 2 it's back to positive again so we change concavity twice we change concavity at both plus and minus square root of two so we have two points of inflection let's get a little bit more practice with the product rule let f of X equal x squared plus 3x minus 1 times 2x squared minus X minus 5 what is F prime F is just a fourth degree polynomial so we know that our F prime is going to be a cubic polynomial the question is do we multiply this out and then take the derivative or could we use the product rule and then simplify from there so let's use this as an example of the ladder so if I use the product rule it's going to be the first x squared plus 3x minus 1 times the derivative of the second the derivative of 2x squared minus X minus 5 and then we add the second 2x squared minus X minus 5 times the derivative of the first the derivative of x squared plus 3x minus 1 all right so we do those two derivatives there the first is 4x minus 1 and then the second is 3x plus 2 so now we should probably you know expand these and collect them and we get that F prime is 8x cubed plus 15 x squared minus 20x minus 14 if F of T is equal to 3t plus 1 times the square root of T cubed minus 5t plus 9 what is f prime this is another product rule problem right now I have the function 3 T plus 1 times the function the square root of T cubed minus 5t plus 9 so using the product rule f prime of T will be 3t plus 1 times the derivative of the second term the the square root of T cubed minus 5 plus 9 plus the square root of T cubed minus 5t plus 9 that's the second function times the derivative of the first times the derivative of 3t plus 1 so the first of those two derivatives is a chain rule problem again it is also the square root of a function so it's going to be 1 over 2 square root that's the derivative of the square root of the function evaluated at t cubed minus 5t plus 9 times the derivative of the things inside the square root that would be 3t squared minus 5 and then the derivative of 3t plus 1 is 3 so again we get a common denominator and it will simplify the top a little bit we foil it out and combine and we get 15 T cubed plus 3t squared minus 45 T plus 49 divided by 2 square root of T cubed 2 minus 5t plus 9 and so that's the product rule the derivative of F times G is FG prime plus G f prime the quotient rule is similar it's how we take the derivative of f of X divided by G of X if we know how to differentiate both F and G it's another formula that you need to memorize it's not as nice a formula unfortunately but it is nevertheless just a formula just like the product rule the proof is similar to the product rule it is the bottom G of x times the derivative of the top F prime minus the top F times the derivative of the bottom G Prime and then we divide by the bottom squared that's the derivative of f of X divided by G of X is G F prime minus F G prime divided by G squared the bottom times the derivative of the top minus the top times the derivative at the bottom divided by the bottom weird so that's the quotient rule okay so let's take the derivative of y equals 2x minus 3 divided by 4x plus 1 so dy/dx right it would be the bottom for X plus 1 times the derivative at the top the derivative of 2x minus 3 minus 2x minus 3 times the derivative of the bottom for X plus 1 and then we divide by the bottom squared for X plus 1 squared it's usually not a good idea to expand the bottom it's almost always going to be better to keep it factored because now we can easily see that it's undefined only at negative 1/4 now I can simplify the top a lot we had two derivatives in there the derivative of 2x minus 3 is 2 and the derivative of 4x plus 1 is 4 and then if we distribute those and add them together we get some simplification and we get that this comes down to 14 divided by 4x plus 1 squared so that's dy/dx you have the bottom times the derivative of the top minus the top times the derivative of the bottom divided by the bottom squared another example let's let f of X equal to X minus 1 cubed divided by 5 x squared plus 7 to the fourth power what's f prime so again this is going to be a quotient rule problem so we would have the bottom 5 x squared plus 7 to the fourth power times the derivative of the top 2x minus 1 cubed minus the top 2x minus 1 cubed times the derivative of the bottom the derivative of 5x squared plus 7 to the fourth power and then we need to square the bottom the bottom was 5x squared plus 7 to the fourth power so when we square that we get it to the 8th power now to do those two derivatives in the top there both of them are chain rule problems all right the derivative of 2x minus 1 cubed that's going to be 3 times the thing that we cubed squared so 3 times 2x minus 1 squared and then we have to multiply by the derivative of the thing that we cubed so that would be the derivative of 2x minus 1 that would be 2 and then for the second one we need the derivative of 5x squared plus 7 to the fourth power well that's something to the fourth power so it'll be four times that's something cubed and then we multiply with the derivative of that something so it'll be four times five x squared plus seven cubed times ten x the derivative of 5x squared plus seven we can simplify this by factoring some things out the top is really just two terms where each term is a lot of things multiplied together in each of those two terms we have 2x minus 1/2 at least the second power so it can factor two of them out and we have 5x squared plus seven to at least the third power in each term so we can factor that out in the first term we're left with three times two is six times one factor of 5x squared plus seven and then in the second one we have a minus 10x times a four times 2x minus one we can simplify this in two ways we have in the top a factor of 5x squared plus seven cubed and in the bottom we have 5x plus 7 to the eighth power so we can simplify the power there and get it down to five on the bottom and then the determine parentheses at the end of the top we can simplify that right so we get that this is 2x minus one squared times minus 50 x squared plus 14x plus 42 divided by five x squared plus 7 to the fifth power when we have something like this where we have something to a power divided by something else to a power we can expect those powers to go down by one all right so we had 2 X minus 1 cubed before I even started the problem I knew that my answer would be proportional to 2 X minus 1 squared because I had 5x squared plus 7 to the fourth power I knew that my answer in the bottom would have 5x squared plus 7 to the fifth power all right if that power in the original function is -4 this one's - so it's gone down by one let's do one more example if f of X is x times the square root of x squared plus 1 divided by 2x plus 9 what is f prime well let's look at this here that is a quotient right it's a function divided by another function so I'll use the quotient rule F prime is the bottom 2x plus 9 times the derivative at the top the derivative of X square root of x squared plus 1 minus X square root of x squared plus 1 times the derivative at the bottom so that would be the derivative of 2x plus 9 and then we divide by the bottom squared 2x plus 9 squared so we can simplify this the derivative of the the right term is easy it's 2 but the derivative of the top right the x times the square root of x squared plus 1 that is unfortunately a product rule so here we have the product rule embedded within a quotient rule problem right so the derivative of x times the square root of x squared plus 1 will be X the first times the derivative of the second so the derivative of the square root of x squared plus 1 plus the second the square root of x squared plus 1 times the derivative of the first that's going to be the derivative of X so we should simplify this the derivative of the square root of x squared plus 1 that is a chain rule problem right it's the square root of a function so it'll be 1 over 2 square root of x squared plus 1 times the derivative of x squared plus 1 and so I've just copied what I hadn't is the previous line I can turn I can simplify that term in brackets in a couple of ways I had x times 2x divided by 2 so that simplifies to x squared I've got divided by the square root of x squared plus one I can get a common denominator in the top now a common denominator is just going to be the square root of x squared plus one and so we get a term in brackets after we get the common denominator that's going to be 2x squared plus 1 and then the second term is going to have the square root of go away and so if we foil this out we get that it's 2x cubed plus 18x squared plus 9 divided by 2x plus 9 squared times the square root of x squared plus 1 and so we had a quotient rule problem and in the middle of doing the derivative at the top we had to do a product rule and then in doing the derivative of the second function in that product rule we had to use a chain rule problem and so we can deal with functions that are quite complicated now because we know the various ways that they can combine together so next time we'll go back to what we did earlier about understanding the behavior of a function and since we know how to take the derivatives of more complicated functions now we'll study their behavior