Current time:0:00Total duration:9:17

0 energy points

# Differentiating composite functions 1 (chain rule)

Video transcript

- [Voiceover] Let's say we
have the function f of x which is equal to cosine
of x to the third power which we could also write like this, cosine of x to the third power. And we are interested in figuring out what f prime of x is going to be equal to. So we want to figure out f
prime of x and as we will see, the chain rule is going
to be very useful here and what I'm going to do is I'm going to first just
apply the chain rule and then maybe dig into it a little bit to make sure we draw the connection between what we're doing here
and then what you might see in maybe some of your Calculus textbooks that explain the chain rule. So if we have a function that is defined as essentially
a composite function, notice this expression right here, we are taking something
to the third power. It isn't just an x that we're
taking to the third power. We are taking a cosine
of x to the third power. So we're taking a function,
you could view it this way, we're taking the function cosine of x and then we're inputting
it in to another function that takes it to the third power. So let me put it this way. If you viewed, if you say, look, we could take an x, we put it into one function and that is, that first function is cosine of x so first, we evaluate the cosine and so that's going to
produce cosine of x, cosine of x, and then we're going to
input it into a function that just takes things to the third power. So it just takes things
to the third power. And so what are you going to end up with? Well, you're going to end up with, what are you taking to the third power? You're taking cosine of x. Cosine of x to the third power. This is a composite function. You could view this, you could view this as the function, let's call this blue one, the function v and let's call this the function u and so if we're taking x and into u, this is u of x and then if we're taking
u of x into the input or as the input into the function v then this output right over here, this is going to be v of, well, what was inputted? V of u of x. V of u of x or another way of writing it, I'm going to write it multiple ways. That's the same thing as v of cosine of x. V of cosine of x. And so v, whatever you input into it, it just takes it to the third power. If you were to write v of x, it would be x to the third power. So the chain rule tells us or the chain rule is what
our brain should say. Hey, it becomes applicable if we're going to take the
derivative of a function that can be expressed as a
composite function like this. So just to be clear, we can write f of x. f of x is equal to v of u of x. I know I'm essentially
saying the same thing over and over again but I'm saying it in
slightly different ways because the first time you learn this, it can be a little bit hard to grok or really deeply understand so I'm going to try to
write it in different ways. And the chain rule tells us that if you have a situation like this then the derivative, f prime of x, and this is something that you
will see in your textbooks. Well, this is going to be the derivative of this whole thing with respect to u of x so we could write that
as v prime of u of x. V prime of u of x times the derivative
of u with respect to x. Times u prime of x. This right over here, this is one expression of the chain rule and so how do we evaluate it in this case? Well, let me color code
it in a similar way. So the v function, this outer thing that just
takes things to the third power, I'll put in blue. So f prime of x, another way of expressing it and I'll use it with more of
the differential notation, you could view this as the derivative of, well, I'll write it a
couple of different ways. You could view it as the derivative of v. The derivative of v with respect to u. I want to get the colors right. The derivative of v with respect to u, that's what this thing is right over here, times the derivative of u with respect to x. So times the derivative
of u with respect to x. And just to be clear, so you're familiar with
the different notations you'll see in different textbooks, this is this right over here
just using different notations and this is this right over here. So let's actually evaluate these things. You're probably tired of
just talking in the abstract. So this is going to be equal to, this is going to be equal to and I'm going to write it out again, this is the derivative, instead of just writing v and u, I'm going to write it,
let me write this way. This is going to be, I keep wanting, I'm
using the wrong colors. This is going to be the derivative of, and I'm going to leave some space, times the derivative of something else with respect to something else so we're going to have to
first take the derivative of v. Well, v is cosine of x to the third power. Cosine of x. We're going to take the derivative of that with respect to u which
is just cosine of x and we're going to multiply that times the derivative of
u which is cosine of x with respect to x. With respect to x. So this one, we have good, we've seen this before. We know that the derivative
with respect to x of cosine of x. Cosine. We use it in that same color. The derivative of cosine of x, well, that's equal to negative sine of x. So this one right over here,
that is negative sine of x. You might be more familiar with seeing the derivative operated this way but in theory, you won't see this as often but this helps my brain
really grok what we're doing. We're taking the derivative of cosine of x with respect to x. Well, that's going to
be negative sine of x. Well, what about taking the derivative of cosine of x to the third power with respect to cosine of x? What is this thing over here mean? Well, if I were taking the derivative, if I was taking the derivative of, let me write it this way, if I was taking the derivative
of x to the third power, x to the third power with respect to x, if it was like that, well, this is just going to be and let me put some brackets here to make it a little bit clear. If I'm taking the derivative of that, that is going to be, that is going to be, we bring the exponent out front. That's going to be three, three times x. Three times x to the second power. Three times x to the second power. So the general notion here is if I'm taking the derivative of something, whatever this something happens to be, let me do this in a new color. I'm doing the derivative of
orange circle to the third power with respect to orange circle. Well, that's just going
to be three times orange or yellow circle. Let me make it an actual orange circle. So the derivative of orange
circle to the third power with respect to orange circle, that's going to be three times
the orange circle squared. So if I'm taking the
derivative of cosine of x to the third power with
respect to cosine of x, well, that's just going to be, this is just going to be three times cosine of x, cosine of x to the second power. To the second power. Notice, one way to think about it. I'm taking the derivative
of this outside function with respect to the inside. So I would do the same thing as taking the derivative
of x to the third power but instead of an x, I have a cosine of x so instead of it being three x squared, it is three cosine of x squared and then the chain rule says, if we want to get finally get the derivative with respect to x, we then take the derivative of cosine of x with respect to x. I know that's a big mouthful
but we are at the homestretch. We've now figured out the derivative. It's going to be this times this. So let's see, that's going
to be negative three, negative three times sine of x times cosine squared of x and I know that was kind
of a long way of saying it. I'm trying to explain the
chain rule at the same time. But once you get the hang of
it, you're just going to say, alright, well, let me take
the derivative of the outside of something to the third power
with respect to the inside. Let me just treat that cosine
of x like as if it was an x. Well, that's going to be, if I do that, that's going to
be three cosine squared of x so that's that part and that part and then let me take the
derivative of the inside with respect to x. Well, that is negative sine of x.