Main content
AP®︎ Calculus AB (2017 edition)
Course: AP®︎ Calculus AB (2017 edition) > Unit 3
Lesson 9: Chain rule- Chain rule
- Chain rule
- Identifying composite functions
- Identify composite functions
- Worked example: Derivative of cos³(x) using the chain rule
- Worked example: Derivative of √(3x²-x) using the chain rule
- Common chain rule misunderstandings
- Chain rule intro
- Worked example: Chain rule with table
- Chain rule with tables
- Proving the chain rule
© 2023 Khan AcademyTerms of usePrivacy PolicyCookie Notice
Identifying composite functions
Review of composite functions and how to recognize them. This is a valuable skill when approaching the Chain Rule in calculus.
Want to join the conversation?
- Can't anything be considered a composite function?(12 votes)
- Well, yes, you can have u(x)=x and then you would have a composite function. In calculus, we should only use the chain rule when the function MUST be a composition. This is the only time where the chain rule is necessary, but you can use it whenever you want, technically.
Example - d/dx(3x+2). Clearly, the answer is 3, but we could use the chain rule:
u(x) = 3x
v(x) = x+2
d/dx(3x+2)=d/dx[v(u(x))])=1*3=3.
So the chain rule is usable but completely unnecessary.(32 votes)
- So atSal said: 3:17
"So this would be cosine of u of x plus one." //where u of x is equal to sin(x)
But couldn't we say that u of x is equal to (sin(x) +1)?
Why did we leave the "1" out?
Or do we get to choose?
Thanks in advance and sorry for my bad wording....(8 votes)- AtSal states "I also want to state that there's oftentimes more than one way to compose ..." 2:37
So, yes you could choose to setu(x) = sin(x) + 1
.
Try determining the derivative both the way Sal shows and this other way — you will find that you get the same answer.(8 votes)
- Hi... anything can be a composite function and chain rule can be applied but when is a function NECESSARILY a composite function?
Thanks in advance :)(5 votes)- Well, a function is necessarily a composite function when you can't simplify it with known simplification techniques to arrive at a function comprised of a single function (a lot of functions have alternate definitions that you can use for simplification/complication later in your math education, like the link between exp(x) and trig functions). For example, (x^2)^2 isn't necessarily a composite function because with simplification, you can end up with x^4, which is a single function. Something that is necessarily a composite function is something like ln(sin(x)), which you can't simplify with elementary techniques to end up with a single function.(8 votes)
- say we have w(u(x)) we can take d/dx of this using the composite rule formula which it becomes
w'(u(x)) * u'(x)
But since this example starts talking about situations where you can use three functions atinstead of two, how would you find the derivate then? 4:36
if g(x) = h(w(u(x))
does d/dx of g(x) become
= h'(w(u(x))) * w'(u(x)) * u'(x) ?
I did some working out and have seen that it can not and it seems that it becomes:
=h'(w(u(x))) * u'(x)
Without the middle term I had above w'(u(x))
I don't understand why I thought it should be in there. Is this correct? What is the proper way to think about the chain rule with more than 2 functions involved in the composition?(4 votes)- You were right the first time, why did you decide it was:
h'(w(u(x))) • u'(x)
?
One way to remember this is to think of taking the derivative in steps:
Letf(x) = w(u(x))
, sog(x) = h(f(x))
Apply the chain rule once:g'(x) = h'(f(x)) • f'(x)
But we already know that:f'(x) = w'(u(x)) • u'(x)
Which gives us:g'(x) = h'(w(u(x))) • w'(u(x)) • u'(x)
(6 votes)
- Hey can't I make h(x)=Cos x and v(x)=sin x +1 then g(x)=h(v(x))=h(sin x +1)=cos(sin x +1) ??(4 votes)
- Yep, that looks about right. As a challenge, could you figure out what v(h(x)) would be?(3 votes)
- Sal says atthat it would be hard to express sin(x)cos(x) as a composite function. What about: 6:51
Let f(x) = x*sin(cos^-1(x))
Let g(x) = cos(x)
Then f(g(x)) = cos(x)*sin(cos^-1(cos(x)) = cos(x)sin(x)(3 votes)- You for sure can do that, but the only problem is, xsin(cos^-1 x) will not be defined for values greater than 1 or less than -1, which makes it "hard" to define it in some other way(3 votes)
- Easy tip.
In a composite function, one is INSIDE another.
Example: ln(sin(x)) because sin(x) is INSIDE ln(x),
except that we take the natural log of sin(x) instead of x in this composite function.(3 votes) - can I apply the chain rule when I have a composition of three functions ? if it's possible, please write the formula for that.(2 votes)
- You can apply the chain rule to f(g(h(x))) by treating g(h(x)) as one function, so you get
f'(g(h(x))·[g(h(x))]'
Then evaluate the derivative of g(h(x)) by using chain rule again.(2 votes)
- what grade do students normally learn this?(2 votes)
- Calculus is usually taught in high school. Identifying composite functions could be taught much earlier, but he's included it here because it's important for the chain rule.(2 votes)
- In the first example, Sal defined the inner function as sin(X) and not the whole thing in the brackets which was (sinx+1). Was it a mistake?(2 votes)
- You could define it like u(x)= (sinx+1) but the "1" won't matter because derivative of constant is 0.(2 votes)
Video transcript
- [Instructor] We're going
to do in this video is review the notion of composite functions and then build some skills recognizing how functions can actually be composed. If you've never heard of
the term composite functions or if the first few minutes of this video look unfamiliar to you, I encourage you to
watch the algebra videos on composite functions on Khan Academy. The goal of this one is
to really be a little bit of a practice before
we get into some skills that are necessary in calculus, and particularly the chain rule. So let's just review what
a composite function is. So let's say that I have, let's say that I have f of x, f of x being equal to one plus x. And let's say that we have g of x is equal to, let's say g of x is equal to cosine of x. So what would f of g of x be, f of g of x? And I encourage you to pause this video and try to work it out on your own. Well one way to think about it is the input into f of x is no longer x, it is g of x. So everywhere where we see an x in the definition of f of x, we would replace with the g of x. So this is gonna be equal to, this is gonna be equal to one plus. Instead of the input being x, the input is g of x, so the output is one plus g of x. And g of x, of course, is cosine of x. So instead of writing g of x there, I could write cosine of x. And one way to visualize this is, I'm putting my x into g of x first, so x goes into the function g, and it outputs g of x. And then we're gonna
take that output, g of x, and then input it into f of x, or input it into the
function f, I should say. We input into the function f, and then that is going to output f of whatever the input was,
and the input is g of x, g of x. So now with that review out of the way, let's see if we can go
the other way around. Let's see if we can look at some type of a function definition and say, hey, can we express that as a composition of other functions. So let's start with, let's say that I have a g of x is equal to cosine of sine of x plus one. And I also wanna state, there's oftentimes more than one way to compose, or to construct a function based on the composition of other ones. But with that said,
pause this video and say, hey, can I express g of x as a composition of two other functions, let's say an f and an h of x? So there's a couple of ways
that you could think about it. You could say, alright, well let's see, I have this sine of x right over here. So what if I called that an f of x? So let's say I called that, well actually let me
use a different variable so we don't get confused here. Let me call this u of x, the sine of x right over there. So this would be cosine
of u of x plus one. And so if we then divided, if we then defined
another function as v of x being equal to cosine
of whatever its input is plus one, well then this
looks like the composition of v and u of x. Instead of v of x, if we did v of u of x, then this would be cosine
of u of x plus one, let me write that down. So if we wrote v of u of x, which is sine of x, if we did v of u of x, that is going to be equal to cosine of, instead of an x plus one, it's going to be a u of x plus one. And u of x, let me write this here, u of x is equal to sine of x. That's how we set this up. So we can either write
cosine of u of x plus one, or cosine of sine of x plus one, which was exactly what we had before. And so this function, g of x, is we say u of x is equal to sine of x, if we say u of x is equal to sine of x, and v of x is equal to
cosine of x plus one, then we could write g
of x as the composition of these two functions. Now you could even make it a
composition of three functions. We could keep u of x to
be equal to sine of x. We could define, let's say, a w of x to be equal to x plus one. And so then, let's think about it. W of x, w of u of x, I should say, w of u, I'll do the same color, w of u of x is going to be equal to. Now my input is no longer x, it's u of x, so it's going to be a u of x plus one, or just sine of x plus one. So that's sine of x plus one. And then if we define a third function, let's say, let's see, I'll call it, let's call it h; we're
running out of variables, although there are a lot of letters left. So if I say h of x is
just equal to the cosine of whatever I input, so it's
equal to the cosine of x, well then h of w of u of x is gonna be g of x. Let me write that down. H of w of u of x, u of x, is going to be equal to, remember, h of x takes the cosine of whatever its input is, so it's gonna take the cosine. Now its input is w of u of x. We already figured out w of u of x is going to be this business. So it's going to be sine of x plus one, where the u of x is sine of x, but then we input that into w, so we got sine of x plus one, and then we inputed that into h to get cosine of that, which is our original expression, which is equal to g of x. So the whole point here is to appreciate how to recognize
compositions of functions. Now I wanna stress, it's not always going to be a composition of a function. For example, if I have some function, let me just clear this out, if I had some function f of x is equal to cosine of x times sine of x, it would be hard to express this as a composition of functions, but I can represent it as
the product of functions. For example, I could say cosine of x, I could say u of x is
equal to cosine of x. And I could say v of x,
it's a different color, I could say v of x is equal to sine of x. And so here, f of x
wouldn't be the composition of u and v, it would be the product. F of x is equal to u of x times v of x. If we were take the composition, if we were to say u of v of x, pause the video, think about what that is, and that's a little bit of review. Well this is going to be, I take u of x takes the cosine of whatever is input, and now the input is v of
x, which would be sine of x; sine of x. And then if you did v of u of x, well that'd be the other way around. It would be sine of cosine of x. But anyway, this is once again, just to help us recognize, hey, do I have, when I look at an expression
or a function definition, am I looking at products of functions, am I looking at compositions of functions? Sometimes you're looking
at products of compositions or quotients of compositions, all sorts of different combinations of how you can put functions together
to create new functions.