- Need one-on-one tutoring with me? I teach all of this material! Contact me for a quick response on your needs.
- Want my FULL version of these notes with more worked examples and help? Click here.
Introduction
 Thus far we have looked at differentiating “simple” functions, for example using the power rule on functions of the form  . But what about more complicated functions, such as
. But what about more complicated functions, such as  ? These more complicated examples require slightly different methods, which I’ll introduce by first discussing function composition.
? These more complicated examples require slightly different methods, which I’ll introduce by first discussing function composition.
Function Notation and Compositions
Recall in function notation that, if  , finding
, finding  is as simple as plugging the 2 in for
 is as simple as plugging the 2 in for  inside of
 inside of  . This is also true with more complicated arguments! For example, we would find
. This is also true with more complicated arguments! For example, we would find  by plugging in
 by plugging in  for
 for  in
 in  . This produces
. This produces  
  . For practice, show that
. For practice, show that  
  
  .
.
 in the above example is another function of
 in the above example is another function of  , distinct from
, distinct from  . Let’s call it g, so that
. Let’s call it g, so that  . Then the second example above could be written as
. Then the second example above could be written as  , because we plugged in the entire function of
, because we plugged in the entire function of  for the variable in
 for the variable in  . Plugging in a function for the variable in another function is the composition of those functions:
. Plugging in a function for the variable in another function is the composition of those functions:
      
Check out my full notes on this section for a more detailed review of function composition as well as practice with function notation like used above.
The Chain Rule
This ends up being useful in calculus when we want to take the derivative of functions that match rules we already know (such as the power rule), but that have more complicated arguments inside. Consider my example in the introduction,  . This is similar to something we can take the derivative of already (using the power rule), namely,
. This is similar to something we can take the derivative of already (using the power rule), namely,  , however instead of
, however instead of  being taken to that power, we have a whole function. If we call the function we already know how to work with
 being taken to that power, we have a whole function. If we call the function we already know how to work with  , and the “inner” function
, and the “inner” function  , then we can say that
, then we can say that  in this example. This is a composition of functions, and we already know how to take the derivative of the “outer” function! Such situations require the chain rule of differentiation:
 in this example. This is a composition of functions, and we already know how to take the derivative of the “outer” function! Such situations require the chain rule of differentiation:
I’ve used the two most common notations you’ll come across. They both have tricky aspects that often throw people off. The first notation is shorthand and uses the “prime” notation. Although the meaning of  is fairly straightforward (the derivative of
 is fairly straightforward (the derivative of  with respect to
 with respect to  ), the meaning of
), the meaning of  is less straightforward. The prime hides the important fact that this derivative is not just with respect to
 is less straightforward. The prime hides the important fact that this derivative is not just with respect to  , it is with respect to the inner function,
, it is with respect to the inner function,  . The second notation shows this more clearly, although it hides the independent variable;
. The second notation shows this more clearly, although it hides the independent variable;  becomes
 becomes  here, and
 here, and  becomes
 becomes  .
.
What does it mean to take a derivative with respect to  instead of with respect to
 instead of with respect to  ? When the chain rule is first being learned, I prefer not to get bogged down in the details of this question. Instead, I’d rather you think of this rule in words, just like with the product rule and quotient rule. In general, let’s say you have a derivative rule, such as the power rule. Let’s also say you seek to take the derivative of a function that matches the rule, except you have another function (call it the “inside” function) plugged into the variable of your rule. You take the derivative of the function using the rule just like you ordinarily would, but you must also multiply this by the derivative of the inside function. You can think something more condensed, like derivative of outside times the derivative of what’s inside.
? When the chain rule is first being learned, I prefer not to get bogged down in the details of this question. Instead, I’d rather you think of this rule in words, just like with the product rule and quotient rule. In general, let’s say you have a derivative rule, such as the power rule. Let’s also say you seek to take the derivative of a function that matches the rule, except you have another function (call it the “inside” function) plugged into the variable of your rule. You take the derivative of the function using the rule just like you ordinarily would, but you must also multiply this by the derivative of the inside function. You can think something more condensed, like derivative of outside times the derivative of what’s inside.
The Process Explained
Say we wanted to take the derivative of my example above,  . This is similar to
. This is similar to  , which we know how to handle, but instead of
, which we know how to handle, but instead of  , we have
, we have  plugged into the base of the exponent. So, we take the derivative just like normal, which is
 plugged into the base of the exponent. So, we take the derivative just like normal, which is  , but we must tack on a derivative of the inner function afterwards as well (shown in red):
, but we must tack on a derivative of the inner function afterwards as well (shown in red):
      ![Rendered by QuickLaTeX.com \[ \diff{}{x} \Big[(x^3 + 5)^5 \Big] = \textcolor{blue}{5(x^3 + 5)^4} \cdot \textcolor{red}{\diff{}{x} \Big[x^3 + 5 \Big]} \]](https://www.mathhelpandtutoring.com/wp-content/ql-cache/quicklatex.com-76d6f53dcdd350127e6ab73ecedb4fff_l3.png)
      ![Rendered by QuickLaTeX.com \[ = \textcolor{blue}{5(x^3 + 5)^4} \cdot  \textcolor{red}{3x^2} \]](https://www.mathhelpandtutoring.com/wp-content/ql-cache/quicklatex.com-b0da04d7fd9e5498f4c2532c4d4b3479_l3.png)
      ![Rendered by QuickLaTeX.com \[ = 15x^2(x^3 + 5)^4 \]](https://www.mathhelpandtutoring.com/wp-content/ql-cache/quicklatex.com-6224dae3ac7a37b492ef3fe42b2547e8_l3.png)
Power Rule Examples
Let’s take a look at some more examples that utilize the power rule as the “outer” function, since we’ve only discussed the power rule so far in these notes. For problems with later special functions, see the next section!
Example 1
Use the chain rule to find the derivative of  .
.
 
Here we have a problem similar to the power rule, but the inner function is  instead of the standard
 instead of the standard  , so we need to use the chain rule. The derivative is the derivative using the power rule without changing the inner function, times the derivative of the inner function:
, so we need to use the chain rule. The derivative is the derivative using the power rule without changing the inner function, times the derivative of the inner function:
      ![Rendered by QuickLaTeX.com \[ f'(x) = 4(16x^2 + 1)^3 \cdot \diff{}{x} \Big[16x^2 + 1 \Big] \]](https://www.mathhelpandtutoring.com/wp-content/ql-cache/quicklatex.com-8e1ced04d7fb62c04079469fa181886b_l3.png)
      ![Rendered by QuickLaTeX.com \[ = 4(16x^2 + 1)^3 \cdot (32x) \]](https://www.mathhelpandtutoring.com/wp-content/ql-cache/quicklatex.com-e87f638a893b7689a7c7c7773a9c5c3e_l3.png)
      ![Rendered by QuickLaTeX.com \[ = 128x(16x^2 + 1)^3 \]](https://www.mathhelpandtutoring.com/wp-content/ql-cache/quicklatex.com-7286534715b3f9c798195bbdcb01a166_l3.png)
where on the last line, I combined the terms in the multiplication out in front.
Example 2
Find   where
 where 
We know that  can be differented using the power rule (since the square root means taken to the power of 1/2), but because we have
 can be differented using the power rule (since the square root means taken to the power of 1/2), but because we have  plugged into the square root, we need the chain rule:
 plugged into the square root, we need the chain rule:
      ![Rendered by QuickLaTeX.com \[ \diff{y}{x} = \frac{1}{2}(x+16)^{-1/2} \cdot \diff{}{x} \Big[ x+ 16 \Big] \]](https://www.mathhelpandtutoring.com/wp-content/ql-cache/quicklatex.com-92dc048b633a36152f659a51ceda8ef2_l3.png)
      ![Rendered by QuickLaTeX.com \[ = \frac{1}{2\sqrt{x+16}} \cdot(1) = \frac{1}{2\sqrt{x+16}} \]](https://www.mathhelpandtutoring.com/wp-content/ql-cache/quicklatex.com-00d9fe49f7da17bb3de0b4d634de42b9_l3.png)
Here, the chain rule didn’t really change the process or the outcome, although it’s always necessary with composite functions. This will happen if the “inner” function is just a “shift” of the variable, in this case  instead of just
 instead of just  .
.
Example 3
Let  . Find
. Find  .
.
Using the chain rule, we get:
      ![Rendered by QuickLaTeX.com \[ \diff{x}{t} = \frac{1}{2}(t^4 - 3t^2 + 1)^{-1/2} \cdot \diff{}{t} \Big[t^4 - 3t^2 + 1 \Big] \]](https://www.mathhelpandtutoring.com/wp-content/ql-cache/quicklatex.com-56e64b5e41bc6069ac73b1835ba38662_l3.png)
      ![Rendered by QuickLaTeX.com \[ = \frac{1}{2}(t^4 - 3t^2 + 1)^{-1/2} \cdot (4t^3 - 6t) \]](https://www.mathhelpandtutoring.com/wp-content/ql-cache/quicklatex.com-072454db0d4850ea79cbecaefc139813_l3.png)
      ![Rendered by QuickLaTeX.com \[ = \frac{2t^3 - 3t}{\sqrt{t^4 - 3t^2 + 1}} \]](https://www.mathhelpandtutoring.com/wp-content/ql-cache/quicklatex.com-91b3652b6abb7dfeaca1914636a4491b_l3.png)
And we’re done.
Example 4
Find the derivative of  .
.
We have a product of two functions in parentheses here, which necessitates the product rule. That proceeds as follows:
      ![Rendered by QuickLaTeX.com \[ g'(x) = \diff{}{x} \Big[ 2x+3 \Big] \cdot (x^2-4)^7 + (2x+3) \cdot \textcolor{blue}{\diff{}{x} \Big[(x^2-4)^7 \Big]} \]](https://www.mathhelpandtutoring.com/wp-content/ql-cache/quicklatex.com-24b65640ccf3b78ded7caeab3b22b399_l3.png)
where the final terms requires the chain rule:
      ![Rendered by QuickLaTeX.com \[ \textcolor{blue}{\diff{}{x} \Big[(x^2-4)^7 \Big] = 7(x^2 -4)^6 \cdot (2x)  = 14x(x^2 - 4)^6} \]](https://www.mathhelpandtutoring.com/wp-content/ql-cache/quicklatex.com-7efdb3a6560c7d07c92047b76c97bcf2_l3.png)
where  is the derivative of
 is the derivative of  . Plugging in and simplifying, we get
. Plugging in and simplifying, we get
      ![Rendered by QuickLaTeX.com \[ g'(x) = 2 \cdot (x^2 - 4)^7 + (2x+3) \cdot \textcolor{blue}{14x(x^2 - 4)^6} \]](https://www.mathhelpandtutoring.com/wp-content/ql-cache/quicklatex.com-e211bc5a74a953a87887712e26e71b45_l3.png)
In the interest of simplification, I’ll now factor out  from both of the additive terms:
 from both of the additive terms:
      ![Rendered by QuickLaTeX.com \[ = (x^2 - 4)^6 \cdot \Big[2(x^2 -4)^1 + (2x+3)\cdot 14x \Big] \]](https://www.mathhelpandtutoring.com/wp-content/ql-cache/quicklatex.com-28fd1b90b2e96cb15a5576d2ec051459_l3.png)
      ![Rendered by QuickLaTeX.com \[ = (x^2 - 4)^6(30x^2 +42x -8) \]](https://www.mathhelpandtutoring.com/wp-content/ql-cache/quicklatex.com-b80d5f0bf4ba6a55542c461a7f5d1f4d_l3.png)
Example 5
Compute the derivative of  .
.
There really aren’t any tricks to be played here, so we have to use the quotient rule. One of the derivatives in the quotient rule will require a chain rule, but we’ll worry about that when we get to it. Then,
      ![Rendered by QuickLaTeX.com \[ z' = \frac{\textcolor{blue}{\diff{}{x} \Big[ \sqrt{x^3 - 2} \Big]} \cdot (2x^2 - 3) - \sqrt{x^3 - 2} \cdot \diff{}{x} \Big[2x^2 - 3 \Big] }{(2x^2 - 3)^2} \]](https://www.mathhelpandtutoring.com/wp-content/ql-cache/quicklatex.com-1f36d804927be646acd805d9e94361cf_l3.png)
The blue term requires the chain rule:
      ![Rendered by QuickLaTeX.com \[ \textcolor{blue}{\diff{}{x} \Big[ \sqrt{x^3 - 2} \Big] = \frac{1}{2}(x^3 - 2)^{-1/2} \cdot (3x^2) = \frac{3x^2}{2\sqrt{x^3 - 2}}} \]](https://www.mathhelpandtutoring.com/wp-content/ql-cache/quicklatex.com-d7f462a7c2d3e086c5d00f8bd151d397_l3.png)
Continuing on, we have
      ![Rendered by QuickLaTeX.com \[ z' = \frac{\textcolor{blue}{\frac{3x^2}{2\sqrt{x^3 - 2}}} \cdot (2x^2 - 3) - \sqrt{x^3 - 2} \cdot (4x)}{(2x^2 - 3)^2} \]](https://www.mathhelpandtutoring.com/wp-content/ql-cache/quicklatex.com-e56e1e2102c7ad753fad897ade917cdc_l3.png)
Show that, upon multiplying top and bottom by  , we get
, we get
      ![Rendered by QuickLaTeX.com \[ = \frac{6x^4 - 9x^2 - 8x(x^3 - 2)}{2(2x^2 - 3)^2\sqrt{x^3 - 2}} \]](https://www.mathhelpandtutoring.com/wp-content/ql-cache/quicklatex.com-d40f2405187392bb4bbed355ef3b3eca_l3.png)
      ![Rendered by QuickLaTeX.com \[ = \frac{-2x^4 - 9x^2 + 16x}{2(2x^2 - 3)^2\sqrt{x^3 - 2}} \]](https://www.mathhelpandtutoring.com/wp-content/ql-cache/quicklatex.com-4f76443f543e06dca0ac57ba5571b1b8_l3.png)
More Chain Rule Examples
The following are more examples of using the chain rule with special functions which are only covered later on in these notes. These problems only apply after you’ve done some future material as well.
Example 6
Find the derivative of  .
.
We know that  , so now we have to find
, so now we have to find  which, employing the chain rule, is
 which, employing the chain rule, is  :
:
      ![Rendered by QuickLaTeX.com \[ y' = e^{x^3}} \cdot 3x^2 \]](https://www.mathhelpandtutoring.com/wp-content/ql-cache/quicklatex.com-1846dcae6267568fa64cf375ffc96914_l3.png)
      ![Rendered by QuickLaTeX.com \[ = 3x^2 e^{x^3}} \]](https://www.mathhelpandtutoring.com/wp-content/ql-cache/quicklatex.com-48cbb2a27a57a6c73b3bf3c2e4835160_l3.png)
Example 7
Let  . Find
. Find  .
.
We know that  so now we have to find
 so now we have to find  which, employing the chain rule, is
 which, employing the chain rule, is  
  .
.
This often confuses people because they want to make it   instead of
 instead of  , however the chain rule requires the first term to be
, however the chain rule requires the first term to be  and not
 and not  , so we leave the inner argument alone for the first half of the chain rule:
, so we leave the inner argument alone for the first half of the chain rule:
      ![Rendered by QuickLaTeX.com \[ \diff{}{t} \Big[ \ln{(12t^4 - 3)} \Big] = \frac{48t^3}{12t^4 - 3} \]](https://www.mathhelpandtutoring.com/wp-content/ql-cache/quicklatex.com-a3d25979e7f7ef57309c34da5449379c_l3.png)
Example 8
Find  where
 where  .
. 
We know that  , so now we have to find
, so now we have to find  which, employing the chain rule, is
 which, employing the chain rule, is  so:
 so:
      ![Rendered by QuickLaTeX.com \[ f'(x) = \cos{(12x^2)} \cdot 24x \]](https://www.mathhelpandtutoring.com/wp-content/ql-cache/quicklatex.com-64071b11cf8f86d8c0e3ab75d5a71d5f_l3.png)
      ![Rendered by QuickLaTeX.com \[ = 24x \cos{(12x^2)} \]](https://www.mathhelpandtutoring.com/wp-content/ql-cache/quicklatex.com-c1c1c9610e96bad885243e70ffd4c9c5_l3.png)
Example 9
Find  where
 where  .
. 
We know that  , so now we have to find
, so now we have to find  which, employing the chain rule, is
 which, employing the chain rule, is  so:
 so:
      ![Rendered by QuickLaTeX.com \[ f'(x) = \sec^2{(12x^2)} \cdot 24x \]](https://www.mathhelpandtutoring.com/wp-content/ql-cache/quicklatex.com-caec6219d63eb9420e5a418f2e00e01d_l3.png)
      ![Rendered by QuickLaTeX.com \[ = 24x \sec^2{(12x^2)} \]](https://www.mathhelpandtutoring.com/wp-content/ql-cache/quicklatex.com-2d485c85d505ed03f1ced3fbe41f7cea_l3.png)
Need more? Here you can get the full version of these notes!
![Rendered by QuickLaTeX.com \begin{align*}  \diff{}{x} \bigg[ f\Big(g(x)\Big) \bigg] & = f' \Big( g(x) \Big) \cdot g'(x) & \text{(Chain Rule)}  \\ & = \diff{f}{g} \cdot \diff{g}{x} & \text{(Condensed)} \end{align*}](https://www.mathhelpandtutoring.com/wp-content/ql-cache/quicklatex.com-b1dd334662947efdf7a4879a5be16c2b_l3.png)
![Rendered by QuickLaTeX.com \begin{align*} \diff{}{x} \bigg[ f\Big(g(x)\Big) \bigg] & = f' \Big( g(x) \Big) \cdot g'(x) \; \; \; \; \text{(Chain Rule)}  \\ & = \diff{f}{g} \cdot \diff{g}{x} \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \text{(Condensed)} \label{chainrule2} \\  \end{align*}](https://www.mathhelpandtutoring.com/wp-content/ql-cache/quicklatex.com-e6d9089cbf7cd6ec6eb0ea7b66e09279_l3.png)