 So what about the derivative of a composite function f of g of x? Let's get an answer we trust first, and that way we can evaluate any newfangled rule somebody might propose. So for example, how about the derivative of 2x plus 5 squared? And that's a function of a function, that's a square of a thing. So if we had to differentiate this and didn't know any other options, we could expand. And now we have a nice polynomial, we can differentiate. So let's take a guess as what the derivative might be. Well, maybe the derivative of a composite function is just the derivative of the derivative. Well, let's see. So that says I have a square function, so maybe the derivative is 2, something to the first power, and then the derivative of the inside. But we know what the derivative is supposed to be, 8x plus 20, and so this can't be right. So let's go back to the definition. So the derivative by the definition is the limit of the difference quotient. Now we're about to do a lot of algebra, and the calculus is going to be very complicated. It'll be referring back to this definition. So the first important observation here is that you can call the independent variable anything that you want. So my derivative of f of x is going to be defined as... But I can drop out this independent variable and leave behind an empty set of parentheses. And again, whatever goes in one set of parentheses has to go in all of them. And so the question is what do we want inside the set of parentheses? Well, if we look at our definition of the derivative of the composite function, we have a minus f of g of x. And so we'd like to put a g of x inside this last set of parentheses. And so we can, as long as we put it in all the other sets of parentheses, here and here. So again, we can call the independent variable anything we want. We traditionally use h for our derivatives, but there's a possibility of some confusion because the h here is different from the h here. So instead of calling this h, we'll call it k. And so while we're trying to find this limit to find the derivative, we do note that some of this expression appears in the limit we would describe as f prime of g of x. Now another useful idea is that you can get anything you want as long as you pay for it. And here we see that inside our first set of parentheses we have g of x plus h, but we want it to be g of x plus k. And so that means we want g of x plus h to equal g of x plus k. Incidentally, that's why it's so important to have switched the variables out because the h inside the parentheses is going to be different from the k outside the parentheses. Well, we can get anything we want as long as we pay for it. So if we want this, then we know that k itself is g of x plus h minus g of x. And so I can rewrite this derivative. Now another important thing to remember is that if a limit exists, it doesn't matter how you got there. And so the thing to note is that since we define k the way that we did, if h goes to zero, then k will also go to zero. And so if a limit exists, it has to exist, whether we let k go to zero or h go to zero. So I can rewrite this in terms of h. And now let's compare. Our numerator is the same as our numerator. And our denominator is different. But remember, you can get anything you want as long as you pay for it. We want a g of x plus h minus g of x in the denominator. So we'll put it there and pay for it by putting a copy in the numerator. And don't forget the denominator also had that factor of h, so let's keep that. And now we have a limit of a product which we can rewrite as the product of the limits. This first limit is what we found as the derivative of f at g of x, no prime. And the other factor, well, that's straight out of the definition of the derivative of g of x. And that gives us the chain rule. The derivative of the composite function f of g of x is the derivative of f at g of x times the derivative of g of x. And so we can find the derivative of 2x plus 5 squared. Well, that's going to be the derivative of something squared. The derivative of something squared is 2 something to the first power. And our chain rule says that we also multiply by the derivative of r something. And the kindergarten rule says put things back where you found them. What was in the parentheses was 2x plus 5, so we'll put a 2x plus 5 in every set of parentheses. And the derivative of 2x plus 5 is just 2, and so our derivative will be. And that is the answer we trust.