The product rule says, the derivative of a product of two differentiable functions, that is, let's suppose that y is a function of g and f. Say y is a function of f of x and g of x, and y is the product of those two functions right there. Well, what we need to do is we take the first function times the derivative of the second plus the second function times the derivative of the first. So what's happening is that we have to take the derivative of each element combined and multiply it by the second element and then we sum those. So here's my example. Y is equal to 3x squared times 5x cubed. So remember we take the first element, the 3x and we multiply it by the derivative of the second element, and then we add that to the second element times the derivative of the first element. How do we get these numbers right here? Well, remember you were using the product rule. So the first part is 3x squared times the derivative of 5x cubed. Five x cubed using the power rule, three comes in front of the five times x times the power of 3 minus 1 which becomes squared. So this first component becomes 3x squared times 15x squared and that's what we see right here. But we have a second set of elements here that we need to take the derivative of. We need to take the second element times the derivative of the first. So my second element is my 5x cubed here. The derivative of my first element is, we take the power rule, two comes down in front of the three. So we have 2 times 3 multiply that by x and then to the power of 2 minus 1 which is 1. Then we're multiplying those guys together. So we have this plus 6x times 5x cubed. That's this right here. Then, I simplify it. So now, I can multiply my three and my 15 and then I can multiply these x's. But when I multiply the x's, I can add the exponents. So 3 times 15 it gives me 45 and x squared times x squared gives me x to the power of four. Then over here, I do the same thing. I multiply my six and my five and I get 30, and when I multiply my x's, I add exponents and I get x_4. Then, since I have like bases x_4 and x_4, I can actually just add those two together and I end up with 75x_4. Seventy five x_4. Let's try the sum and difference rule and the product rule on some different examples. Let's work some practice problems. For each one of these things, we're going to calculate the margin and we're going to go through these as methodically as we need to, make sure that you're understanding this concept. So what we have here is I've got my total cost function. So total cost is a function of q, 3Q to the power 3 plus 7Q plus 12. Here's my profit function. Profit is equal to Q squared minus 13Q plus 78. Here's a total revenue function. Total revenue is equal to 12Q minus Q squared. So let's take the derivative of each one of these functions. To the first one first. So if my total cost is equal to 3Q squared, excuse me, 3Q cubed plus 7Q plus 12. So here we take the derivative. We're going to use the power rule obviously but we're also going to use the sum rule, because this total cost is the sum of three different elements, 3Q to the power three, 7Q, and 12. So when I take the derivative of my total cost with respect to the derivative of quantity, I will get this. This first one, the power rule. I take this three in the power, I bring it down in front of the other three. Three times 3 is 9 to Q to the power of 3 minus 1 which gives me 2. Plus, here, the power of one, 7Q to the power of one. I bring one in front of that seven, I end up with a seven here times Q, Q to the power of 1 minus 1 is Q to the 0, which is one which gives me 7. Plus, now there is no Q over here next to that 12 which means the derivative of that with respect to Q is zero. So the derivative of my total cost function with respect to quantity is equal to 9Q squared plus seven. Try to take the derivative of equation two. That is, pi is equal to or profit is equal to Q squared minus 13Q plus 78. Pause the video for a second and then you can unpause it and I will show you the answer. All right. So we've got our profit function pi is equal to Q squared minus 13Q plus 78. Remember, we'll be using the power rule and also instead of a sum, we have now a difference, Q squared minus 13Q. So derivative of my profit with respect to Q is equal to, we take this two, we put it in front of this Q, 2 times 1 times Q. Now, we're raising it to the power of Q2 minus 1 which gives me 1 up there. Now here we've got a one, 13 times Q to the power of one. Bring that one in front, we're left with 13. We have Q to the power of 1 minus 1. It gives me Q to the power of zero which is equal to one. So I don't have to write the Q there and then 78 there's no Q. So the derivative of 78 with respect to Q is zero. So I am left with this, 2Q minus 13. Try the third equation. Total revenue equals 12Q minus Q squared. Pause the video and then we'll come back and we'll work it out. All right. So we've got a function total revenue is equal to 12Q minus Q squared. We'll be using the power rule and again the difference rule. So the derivative of total revenue with respect to quantity is equal to, so 12, this is Q to the power of one, 1 times 12 is equal to 12 and I'm multiplying it by Q to the power of 1 minus 1. Q to the power of zero is equal to one. So it's left with 12 minus. I take this two and I bring it in front of my coefficient. We can't see the coefficient because it looks like a one and it's 2 times 1 which gives me 2 times Q to the 2 minus 1 which is equal to 1. So the derivative of total revenue with respect to quantity equals 12 minus 2Q.