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 0, f of x plus h minus f of x divided by h. We used that to show that the derivative of a constant was 0, 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 I mean that only applies of C is a constant and then the 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 chain rule, a very important one. It's 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've 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 identify any points of inflection that f of x equals 4 minus x squared to the 3 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 figure... To find our points of inflection, we need to set 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, right? The first one is minus 3x.
We can differentiate that without any trouble. 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 one too. 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 that's going to be the limit as h goes to zero of f of x plus h times g of x plus h minus f of x times g of x divided by h, that's the definition.
I can add and subtract. a term here, f times g. 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 times g minus g divided by h, plus the limit as h goes to 0 of g times f minus f divided by h. And so I see the definition of the derivative popping up in two places there. 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 a 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 and 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 we take the derivative of the product of two functions, right? 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 I'll just write it down as just the derivative of the square root of 4 minus x squared, I'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 pretty easy, it's just minus 3, but then that first derivative, the derivative of the square root of 4 minus x squared. That is a chain rule problem, right? That is the square root of a function. So that would be 1 over 2 square root, the derivative of the square rooting function, evaluated at minus 4x squared, the thing that was inside the square root. And then the chain rule says I've 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 zero. 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 three intervals, negative 2 to negative square root of 2, negative square root of 2 to square root of 2, and square root of 2 to 2. Remember the domain of this function is only the closed interval negative 2 to 2. 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 square root of 2, it is negative. And then on square root of 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 2. 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 latter. 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 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. Alright, 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 expand these and collect them, and we get that f prime is 8x cubed plus 15x 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.
I have the function 3t 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 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 rooting function.
Evaluated at t cubed minus 5t plus 9 times the derivative of the thing that was 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 15t cubed plus 3t squared minus 45t plus 49 divided by 2 square root of t cubed minus 5t plus 9. And so that's the product rule. The derivative of f times g is f g 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. gf prime minus fg prime divided by g squared the bottom times the derivative of the top minus the top times the derivative of the bottom divided by the bottom squared 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 4x plus 1 times the derivative of the top and the derivative of 2x minus 3 minus 2x minus 3 times the derivative of the bottom, 4x plus 1, and then we divide by the bottom squared, 4x 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 fourth. Now we 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. We 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 2x minus 1 cubed divided by 5x 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 5x 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 eighth power. Now to do those two derivatives in the top there, both of them are chain rule problems.
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 4 times that something cubed. And then we multiply with the derivative of that something. So it'll be 4 times 5x squared plus 7 cubed.
times 10x, the derivative of 5x squared plus 7. 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 to at least the second power, so we can factor two of them out. And we have 5x squared plus 7 to at least the third power in each term, so we can factor that out. In the first term, we're left with 3 times 2 is 6 times 1 factor of 5x squared plus 7. And then in the second one, we have a minus 10x times a 4 times 2x minus 1. We can simplify this in two ways.
We have in the top a factor of 5x squared plus 7 cubed, and in the bottom, we have 5x plus 7 to the 8th power. So we can simplify the power there and get it down to 5 on the bottom. And then the term in parentheses at the end of the top, we can simplify that.
So we get that this is 2x minus 1 squared times minus 50x squared plus 40x plus 42 divided by 5x squared plus 7 to the 5th 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 1. Alright, so we had 2x minus 1 cubed. Before I even started the problem, I knew that my answer would be proportional to 2x minus 1 squared and then 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 Alright, if that power in the original function is minus 4 this one's minus 5 so it's gone down by 1 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 of the top, the derivative of x square root x squared plus 1, minus x square root x squared plus 1, times the derivative of 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 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 one, plus the second, the square root of x squared plus one, 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 one, 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 had as the previous line. 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 divided by the square root of x squared plus 1. 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 1. And so we get a term in brackets after we get common denominator that's going to be 2x squared plus 1 and then the second term is going to have the square root 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 of 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.