Chain Rule for Composite Functions
Transcript
Hello. I would like to talk with you about the chain rule, or as I like to call it, the composition rule, because it deals with compositions of functions. I would like to talk about this in connection with a particular example. And I want to do an example where I have a total of three functions, because I think there's going to be a lot of value in working through one of those things. So what I'd like to do is set up a problem with you and then tell you about my steps for how
I deal with taking derivatives of compositions of functions. So let's take, as our example function, the function f. Let's make this be equal to sine of e to the tangent of x. Kind of an innocuous function. Not too many symbols to write down. Probably looks a little funky. Oh. Pretty interesting function. I want to take its derivative. I'm going to a write down what f prime is, f prime of x.
I don't know how to deal with this function just by itself. I know how to deal with sine, I how to deal with e to the, and I how to deal with tangent. But all three together? So what I want to do is, I'm going to rewrite my function, which is f of x, and I'm going to break it apart. I'm going to go f of u equals sine of u. How did I know it was sine of u? Why didn't I start with the stuff on the inside here? Well, I'm kind of an outside-in person. So I want to see what's the overall picture?
What's going on here? The overall picture is, I'm taking sine of something. We'll let that u be that something. And now we have to define what u is, and we're going to keep doing this process. u is equal to-- OK, so I did sine. So now we're going to do e to the. But I don't know how to deal with e to the tangent of x, so it looks like e to the. And I'm going to make up a symbol, v. I'm going to choose v because that comes after u. And then v of x is equal to tangent of x.
So I'm going to set myself up for success by doing this. The setup right here, in terms of my top-level function, and then keep going, nesting deeper. And then eliminating, in some sense, all of the complicated stuff and just turning into sine, e to the, and tangent. No problem. I can deal with each of those pieces by themselves, just fine. And so now, I want to write down what their derivatives are. And this thing here tells me the name of the variable that I'm going to differentiate with respect to. So I'm going to compute df/du.
Ultimately, we're computing df/dx. I'm going to do it by computing df/du, du/dv, dv/dx. df/du is equal to, the derivative of sine is cosine. And I'm going to leave that the same argument. That's u. Let's do that for u. u is a function of v. du/dv is equal to e to the v. And finally, dv/dx dx is equal to, the derivative of tangent is secant squared.
OK, so this is my original function. These right here are what I think of as sub-functions that are used to build a bigger function. These right here, they're simple functions, and I know how to take the derivative of e to them. OK. Now, the chain rule says, composition rule says, that df/dx is equal to df/du times du/dv times dv/dx.
And this chain is such that you can think about, we're not actually doing it, but you can think about, oh, well, I have a du down here and a du you up here, so they would cancel. The dv right here and here, they would cancel. And I would just be left over with df/dx. So I just make up the intermediate functions, and then I take the product of everything that I had to do in order to break it into simple pieces. So now, I'm going to grab those pieces from here. df/dx is equal to df/du.
df/du, cosine of u times du/dv, e to the v. E to the v. Common error here. e to the v times-- nope, what am I doing? Times, catching myself. OK, times secant squared. It's the product of the derivatives.
And then, we've got to get back to what x is, because f is a function of x-- df/dx is a function of x, and these, using these, I just made them up in order to be able to write down what the function was in terms of basic pieces. So now, we'll substitute those away. That's equal to cosine-- I'm totally going to run out of space. Do it up here.
Cosine of u, e to the v, tangent of x times e to the tangent of x times secant squared x. So just focusing our attention on this thing at the top here OK. So I want to tie that into the original function. So sine-- cosine, and the argument stayed the same, right? Sine goes to cosine, but the argument of the sine stays the same. And then we chain out the derivative of the inside thing. So now, the inside thing is e to the. And the derivative of e to the is e to the. And I have to chain out the derivative of the inside of that one. The derivative of tangent is secant squared.
So at every level of doing this chain, or this composition of functions, I deal with one level at a time, and then the inside of that just stays the same. And I take the product of those things. And that's how I think about the chain rule. So I feel like it's useful tactic for you, hopefully take away, as you learn how to do this, is to be able to write down little sub-functions for yourself so that they're nice and simple, take their derivatives, take the product of the derivatives,
and then substitute back into the original variable. I think I might conclude this by showing you-- well, OK, so suppose that you didn't find that you needed this, or you found that to be long. Well with practice, and I believe that everybody can do this with practice, I believe that with all of my heart. I have complete and utter faith that every person can learn how to do this with effort, practice, dedication, faith in one's self. When I go to do this, because I have lots of practice,
I can just write down the derivative. And I want to talk through my thought process on how to do that, in this same video with the same function. Because I feel like you should see like, here's the basic step-by-step way. And then, here's how some-- here's how a pattern with proficiency might happen. I feel like it's important for you to see both proficiency and basic skill modeled in my instruction. So when I write down f prime of x, I'm going to approach this function, and I'm an outside-in person today. And so I'm going to look at, what is the outermost function?
The outermost function isn't tangent, the outermost function isn't e to the, the outermost function is sine, and the derivative of sine is cosine. And the inside stays the same. And then, because there was something complicated on the inside, now I have to take the derivative of the thing on the inside. And now, I never-- I don't really need to refer to the original thing again, I can just look at this one. So now, we're going to chain in. I'm going to chain out the derivative of the inside. The derivative of e to the is e to the.
It still wasn't just the basic e to the function. So to keep doing it, the derivative of tangent, secant squared of x. And then, finally, the argument here was x. And so I finally would chain out one more. But then, it's just multiplying by 1, because the derivative of x with respect to x is just 1. And then I finally stop. So once you get down to the basic function, where the argument is x, then you're done. Then you're done. So that's how I practice this without doing the intermediate steps, like making up u and v, and then putting them together later. Thank you very much. I do hope you found this instructive and useful, and I will see you again next time. Goodbye.

Ask anything
We've read this whole study set, so questions about it get the best answers.