Flash and JavaScript are required for this feature.
Download the video from iTunes U or the Internet Archive.
How to find the slope of f(x) times g(x) ? Use the Product Rule.
The slope of f(x)g(x) has two terms:
f(x) times (slope of g(x)) PLUS g(x) times (slope of f(x))
The Quotient Rule gives the slope of f(x) / g(x) . That slope is
[[ g(x) times (slope of f(x)) MINUS f(x) times (slope of g(x)) ]] / g squared
These rules plus the CHAIN RULE will take you a long way.
Professor Strang's Calculus textbook (1st edition, 1991) is freely available here.
Subtitles are provided through the generous assistance of Jimmy Ren.
![Product Rule and Quotient Rule Product Rule and Quotient Rule](/resources/res-18-005-highlights-of-calculus-spring-2010/derivatives/product-rule-and-quotient-rule/lec2.jpg)
Product Rule and Quotient Rule
Related Resources
Lecture summary and Practice problems (PDF)
PROFESSOR: OK. This video is about derivatives. Two rules for finding new derivatives. If we know the derivative of a function f-- say we've found that-- and we know the derivative of g-- we've found that-- then there are functions that we can build out of those. And two important and straightforward ones are the product, f of x times g of x, and the quotient, the ratio f of x over g of x. So those are the two rules we need.
If we know df dx and we know dg dx, what's the derivative of the product? Well, it is not df dx times dg dx. And let me reduce the suspense by writing down what it is. It's the first one times the derivative of the second, we know that, plus another term, the second one times the derivative of the first. OK. So that's the rule to learn. Two terms, you see the pattern. And maybe I ought to use it, give you some examples, see what it's good for, and also some idea of where it comes from. And then go on to the quotient rule, which is a little messier.
OK. So let me just start by using this in some examples. Right underneath, here. OK. So let me take, as a first example, f of x equals x squared and g of x equals x. So then what is p of x? It's x squared times x. I'm multiplying the functions. So I've got x cubed, and I want to know its derivative. And I know the derivatives of these guys.
OK, so what does the rule tell me? It tells me that the derivative of p, dp dx-- so p is x cubed. So I'm looking for the derivative of x cubed. And if you know that, it's OK. Let's just see it come out here. So the derivative of x cubed, by my formula there, is the first one, x squared, times the derivative of the second, which is 1, plus the second one, x, times the derivative of the first, which is 2x. So what do we get? x squared, two more x squared, 3x squared. The derivative of x cubed is 3x squared. x cubed goes up faster than x squared, and this is a steeper slope.
Oh, let's do x to the fourth. So x to the fourth-- now I'll take f to be x cubed, times x. Because x cubed, I just found. x, its derivative is 1, so I can do the derivative of x fourth the same way. It'll be f. So practicing that formula again with x cubed and x, it's x cubed times 1 plus this guy times the derivative of f. Right? I'm always going back to that formula. So the derivative of f, x cubed, we just found-- 3x squared-- so I'll put it in. And what do we have? x cubed here, three more x cubeds here. That's a total of 4x cubed.
OK. We got another one. Big deal. What is important is-- and it's really what math is about-- is the pattern, which we can probably guess from those two examples and the one we already knew, that the derivative of x squared was 2x. So everybody sees a 2 here and a 3 here and a 4 here, coming from 2, 3, and 4 there. And everybody also sees that the power dropped by one. The derivative of x squared was an x. The derivative of x cubed involved an x squared.
Well, let's express this pattern in algebra. It's looking like the derivative of x to the n-- we hope for any n. We've got it for n equals 2, 3, 4, probably 0 and 1. And if the pattern continues, what do we think? This 4, this n shows up there, and the power drops by 1. So that'll be x to the n minus 1, the same power minus 1, one power below. So that's a highly important formula.
And actually it's important to know it, not-- right now, well, we've done two or three examples. I guess the right way for me to get this for n equals-- so we really could check 1, 2, 3, and so on. All the positive integers. We could complete the proof. We could establish the pattern. Actually, induction would be one way to do it. If we know it for, as we did here, for n equals 3, then we've got it for 4. If we know it for 4, the same product formula would get it for 5 and onwards, and would give us that answer. Good.
Even better is the fact that this formula is also true if n is a fraction. If we're doing the square root of x, you recognize the square root of x is x to the-- what's the exponent there for square root? 1/2. So I would like to know for 1/2. OK, let me take a couple of steps to get to that one.
All right. The steps I'm going to take are going to look just like this, but this was powers of x, and it'll be very handy if I can do powers of f of x. I'd like to know-- I want to find-- So here's what I'm headed for. I'd like to know the derivative of f of x to the n-th power equals what? That's what I'd like to know.
So let me do f of x. Let me do it just as I did before. Take n equals 2, f of x squared. So what's the derivative of f of x squared, like sine squared or whatever we're squaring. Cosine squared. Well, for f of x squared, all I'm doing is I'm taking f to be the same as g. I'll use the product rule. If g and f are the same, then I've got something squared. And my product rule says that the derivative-- and I just copy this rule.
Now I'm taking p is going to be f squared, right? Can I just write f squared equals-- so it's f times-- f is the same as g. Are you with me? I'm just using the rule in a very special case when the two functions are the same. The derivative of f squared is f. What do I have? f times the derivative of f, df dx. That's the first term. And then what's the second term? Notice I wrote f instead of g, because they're the same. And the second term is, again, a copy of that. So I have 2 of these. Times 2, just the way I had a 2 up there. This was the case of x squared. This is the case of f of x squared.
Let me go one more step to f cubed. What am I going to do for f cubed? The derivative of-- hold on. I have to show you what to pay attention to here. To pay attention to is-- the 2 we're familiar with. This would have been the x, that's not a big deal. But there's something new. A df dx factor is coming in. It's going to stay with us. Let me see it here. The derivative of f of x cubed. Now let's practice with this one.
OK. So now what am I going to take? How do I get f of x cubed? Well, I've got f, so I'd better take g to be f squared. Then when I multiply, I've got cubed. So g is now going to be f squared for this case. Can I take my product rule with f times f squared? My product rule of f times f squared is-- I'm doing this now with g equals f squared, just the way I did it over there at some point with one of them as a square. OK. I'm near the end of this calculation.
OK. So what do I have. If this thing is cubed, I have f times f squared. That's f cubed. And I take its derivative by the rule. So I take f times the derivative of f squared, which I just figured out as 2f df dx. That's the f dg dx. And now I have g, which is f squared, times df dx.
What are you seeing there? You're seeing-- well, again, these combine. That's what's nice about this example. Here I have one f squared df dx, and here I have two more. That's, all together, three. So the total was 3 times f squared times df dx. And let me write down what that pattern is saying. Here it will be n. Because here it was a 2. Here it's going to be 2 plus 1-- that's 3. And now if I have the n-th power, I'm expecting an n times the next lower power of f, f to the n minus 1, times what? Times this guy that's hanging around, df dx. That's my-- you could call that the power rule. The derivative of a power. This would be the power rule for just x to the n-th, and this is the derivative of a function of x to the n-th.
There's something special here that we're going to see more of. This will be, also, an example of what's coming as maybe the most important rule, the chain rule. And typical of it is that when I take this derivative, I follow that same pattern-- n, this thing, to one lower power, but then the derivative of what's inside. Can I use those words? Because I'll use it again for the chain rule. n times one lower power, times the derivative of what's inside.
And why do I want to do such a thing? Because I'd like to find out the derivative of the square root of x. OK. Can we do that? I want to use this, now. So I want to use this to find the derivative of the square root of x. OK. So that will be my function. f of x will be the square root of x. So this is a good example. That's x to the 1/2 power. What would I love to have happen? I would like this formula to continue with n equals 1/2, but no change in the formula. And that does happen.
How can I do that? OK, well, square root of x is what I'm tackling. The easy thing would be, if I square that, I'll get x, right? The square of the square root. Well, square root of x squared-- so there's f of x. I'm just going to use the fact that the square root of x squared is x. Such is mathematics. You can write down really straightforward ideas, but it had to come from somewhere.
And now what am I going to do? I'm going to take the derivative. Well, the derivative on the right side is a 1. The derivative of x is 1. What is the derivative of that left-hand side? Well, that fits my pattern. You see, here is my f of x, squared. And I had a little formula for the derivative of f of x squared. So the derivative of this is 2 times the thing to one lower power-- square root of x just to the first power-- times the derivative of what's inside, if you allow me to use those words. It's this, df dx. And that's of course what I actually wanted, the square root of x, dx.
This lecture is not going to have too many more calculations, but this is a good one to see. That's clear. I take the derivative of both sides. That's clear. This is the 2 square root of x. And now I've got what I want, as soon as I move these over to the other side. So I divide by that. Can I now just do that with an eraser, or maybe just X it out, and put it here. 1 over 2 square root of x. Am I seeing what I want for the derivative of square root of x? I hope so. I'm certainly seeing the 1/2. So the 1/2-- that's the n. It's supposed to show up here. And then what do I look for here? One lower power than 1/2, which will be x to the minus 1/2.
And is that what I have? Yes. You see the 1/2. And that square root of x, that's x to the 1/2, but it's down in the denominator. And things in the denominator-- the exponent for those, there's a minus sign. We'll come back to that. That's a crucial fact, going back to algebra. But, you know, calculus is now using all that-- I won't say stuff. All those good things that we learned in algebra, like exponents. So that was a good example.
OK. So my pattern held for n equals 1/2. And maybe I'll just say that it also would hold for cube roots, and any root, and other powers. In other words, I get this formula. This is the handy formula that we're trying to get. We got it very directly for positive whole numbers. Now I'm getting it for n equals 1 over any-- now I'm getting it for capital Nth roots, like 1/2. Then I could go on to get it for-- I could take then the n-th power of the n-th root. I could even stretch this to get up to m over n. Any fraction, I can get to. But I can't get to negative exponents yet, because those are divisions. Negative exponent is a division, and I'm going to need the quotient rule, which is right now still a big blank.
OK. Pause for a moment. We've used the product rule. I haven't explained it, though. Let me, so, explain the product rule. Where did it come from? I'm going back before the examples, and before that board full of chalk, back to that formula and just think, where did it come from? How did we find the derivative of f times g, of the product p? So we needed delta p, right? And then I'm going to divide by delta x. OK. So let me try to make-- what's the delta p when p is-- remember, p is f times g.
Thinking about f times g, maybe let's make it visual. Let's make it like a rectangle, where this side is f of x and this side is g of x. Then this area is f times g, right? The area of a rectangle. And that's our p. OK, that's sitting there at x. Now move it a little. Move x a little bit. Move x a little and figure out, how much does p change? That's our goal. We need the change in p.
If I move x by a little bit, then f changes a little, by a little amount, delta f, right? And g changes a little, by a little amount, delta g. You remember those deltas? So it's the change in f. There's a delta x in here. x is the starting point. It's the thing we move a little. When we move x a little, by delta x, f will move a little, g will move a little, and their product will move a little. And now, can you see, in the picture, where is the product? Well, this is where f moved to. This is where g moved to. The product is this, that bigger area.
So where is delta p? Where is the change between the bigger area and the smaller area? It's this. I have to figure out, what's that new area? The delta p is in here. OK, can you see what that area-- well, look, here's the way to do it. Cut it up into little three pieces. Because now they're little rectangles, and we know the area of rectangles. Right?
So help me out here. What is the area of that rectangle? Well, its base is f, and its height is delta g. So that is f times delta g. What about this one? That has height g and base delta f. So here I'm seeing a g times delta f, for that area. And what about this little corner piece? Well, its height is just delta g, its width is delta f. This is delta g times delta f. And it's going to disappear. This is like a perfect place to recognize that an expression-- that's sort of like second order. Let me use words without trying to pin them down perfectly.
Here is a zero-order, an f, a real number, times a small delta g. So that's first order. That's going to show up-- you'll see it disappear. These three pieces, remember, were the delta p. So what have I got here? I've got this piece, f delta g, and I'm always dividing by delta x. And then I have this piece, which is the g times the delta f, and I divide by the delta x. And then this piece that I'm claiming I don't have to worry much about, because I divide that by delta x. So that was the third piece.
This is it, now. The picture has led to the algebra, the formula for delta p, the change in the product divided by delta x. That's what calculus says-- OK, look at that, and then take the tricky step, the calculus step, which is let delta x get smaller and smaller and smaller, approaching 0. So what do those three terms do as delta x gets smaller?
Well, all the deltas get smaller. So what happens to this term as delta x goes to 0? As the change in x is just tiny, tiny, tiny? That term is the one that gives the delta g over delta x, in the limit when delta x goes to 0, is that one, right? And this guy is giving my g. That ratio is familiar, df dx. You see, the cool thing about splitting it into these pieces was that we got this piece by itself, which was just the f delta g. And we know what that does. It goes here. And this piece-- we know what that does.
And now, what about this dumb piece? Well, as delta x goes to 0, this would go to df dx, all right. But what would delta g do? It'll go to 0. You see, we have two little things divided by only one little thing. This ratio is sensible, it gives df dx, but this ratio is going to 0. So forget it. And now the two pieces that we have are the two pieces of the product rule. OK. Product rule sort of visually makes sense.
OK. I'm ready to go to the quotient rule. OK, so how am I going to deal, now, with a ratio of f divided by g? OK. Let's put that on a fourth board. How to deal then with the ratio of f over g.
Well, what I know is the product rule, right? So let me multiply both sides by g of x and get a product. There, that looks better. Of course the part that I don't know is in here, but just fire away. Take the derivative of both sides. OK. The derivative of the left side is df dx, of course. Now I can use the product rule. It's g of x, dq dx. That's the very, very thing I'm wanting. dq dx-- that's my big empty space. That's going to be the quotient rule.
And then the second one is q of x times dg dx. That's the product rule applied to this. Now I have it. I've got dq dx. Well, I've got to get it by itself. I want to get dq dx by itself. So I'm going to move this part over there. Let me, even, multiply both sides-- this q, of course, I recognize as f times g. This is f of x times g of x. That's what q was. Now I'm going to-- oh, was not. It was f of x over g of x. Good Lord. You would never have allowed me to go on.
OK. Good. This is came from the product rule, and now my final job is just to isolate dq dx and see what I've got. What I'll have will be the quotient rule. One good way is if I multiply both sides by g. So I multiply everything by g, so here's a g, df dx. And now this guy I'm going to bring over to the other side. When I multiply that by g, that just knocks that out. When I bring it over, it comes over with a minus sign, f dg dx. And this one got multiplied by g, so right now I'm looking at g squared, dq dx. The guy I want.
Again, just algebra. Moving stuff from one side to the other produced the minus sign. Multiplying by g, you see what happened. So what do I now finally do? I'm ready to write this formula in. I've got it there. I've got dq dx, just as soon as I divide both sides by g squared. So let me write that left-hand side. g df dx minus f dg dx, and I have to divide everything-- this g squared has got to come down here. It's a little bit messier formula but you get used to it. g squared. That's the quotient rule.
Can I say it in words? Because I actually say those words to myself every time I use it. So here are the words I say, because that's a kind of messy-looking expression. But if you just think about words-- so for me, remember we're dealing with f over g. f is the top, g at the bottom. So I say to myself, the bottom times the derivative of the top minus the top times the derivative of the bottom, divided by the bottom squared. That wasn't brilliant, but anyway, I remember it that way.
OK. so now, finally, I'm ready to go further with this pattern. I still like that pattern. We've got the quotient rule, so the two rules are now set, and I want to do one last example before stopping. And that example is going to be a quotient, of course. And it might as well be a negative power of x. So now my example-- last example for today-- my quotient is going to be 1. The f of x will be 1 and the g of x-- so this is my f. This is my g. I have a ratio of two things.
And as I've said, this is x to the minus n. Right? That's what we mean. We can think again about exponents. A negative exponent becomes positive when it's in the denominator. And we want it in the denominator so we can use this crazy quotient rule.
All right. So let me think through the quotient rule. So the derivative of this ratio, which is x to the minus n That's the q, is 1 over x to the n. The derivative is-- OK, ready for the quotient rule? Bottom times the derivative of the top-- ah, but the top's just a constant, so its derivative is 0-- minus-- remembering that minus-- the top times the derivative of the bottom.
Ha. Now we have a chance to use our pattern with a plus exponent. The derivative of the bottom is nx to the n minus 1. So it's two terms, again, but with a minus sign. And then the other thing I must remember is, divide by g squared, x to the n twice squared.
OK. That's it. Of course, I'm going to simplify it, and then I'm done. So this is 0. Gone. This is minus n, which I like. I like to see minus n come down. That's my pattern, that this exponent should come down. Minus n, and then I want to see-- oh, what else do I have here? What's the power of x? Well, here I have an x to the n-th. And here I have, twice, so can I cancel this one and just keep this one?
So I still have an x to the minus 1. I don't let him go. Actually the pattern's here. The answer is minus n minus capital N, which was the exponent, times x to one smaller power. This is x to the minus n, and then there's another x to the minus 1. The final result was that the derivative is minus nx to the minus n, minus 1. And that's the good pattern that matches here. When little n matches minus big N, that pattern is the same as that. So we now have the derivatives of powers of x as an example from the quotient rule and the product rule.
Well, I just have to say one thing. We haven't got-- We've fractions, we've got negative numbers, but we don't have a whole lot of other numbers, like pi. We don't know what is, for example, the derivative of x to the pi. Because pi isn't-- pi is positive, so we're OK in the product rule, but it's not a fraction and we haven't got it yet. What do you think it is? You're right-- it is pi x to the pi minus 1. Well, actually I never met x to the pi in my life, until just there, but I've certainly met all kinds of powers of x and this is just one more example.
OK. So that's quotient rule-- first came product rule, power rule, and then quotient rule, leading to this calculation. Now, the quotient rule I can use for other things, like sine x over cosine x. We're far along, and one more big rule will be the chain rule. OK, that's for another time. Thank you.
[NARRATOR:] This has been a production of MIT OpenCourseWare and Gilbert Strang. Funding for this video was provided by the Lord Foundation. To help OCW continue to provide free and open access to MIT courses, please make a donation at ocw.mit.edu/donate.
Free Downloads
Video
- iTunes U (MP4 - 80MB)
- Internet Archive (MP4 - 80MB)
Subtitle
- English - US (SRT)