While studying calculus at home, I reached derivatives, and a book mentioned the chain rule. The book didn't go into much detail, and the internet searches gave me little information, so I was hoping that someone could enlighten me on this fundamental principle of calculus.


6 Answers 6


Okay, so you (hopefully) know how to take the derivative of something like $\tan x$, or

$$\frac{d}{dx}(\tan x)=\sec^2x$$

well what if I gave you something like


Now we have a separate function embedded within our first function. The chain rule says do the derivative like normal (just treat the $x^2$ like an $x$), then multiply by the derivative of the inside function. So we get

$$\frac{d}{dx}(\tan(x^2))=\sec^2(x^2)\cdot 2x=2x\sec^2(x^2)$$

Another way people write this a lot of times is


where $u$ is the "embedded" function. So, in our example we would have $u=x^2$, so $y=\tan u$. Then we would get


So it's consistent with how we did it before, just a little different way of looking at it

  • 3
    $\begingroup$ Very good explanation. I wish books also used similar language...+1 $\endgroup$
    – Paramanand Singh
    Jul 3, 2015 at 3:55
  • $\begingroup$ @ParamanandSingh thanks! $\endgroup$ Jul 3, 2015 at 6:21

Mathematicians often like to compose functions. That is

$(f\circ g)(x) = f(g(x))$,

as you will often see it.

As a more illustrative example of composition we will define two functions:

$f:\mathbb{R} \to \mathbb{R}:x \mapsto \frac{1}{x}$ and $g:\mathbb{R}\to\mathbb{R}:x\mapsto x+1$.

Using these functions, we get:

$(f\circ g)(x) = f(g(x)) = f(x+1) = \frac{1}{x+1}$,

a function that probably isn't too foreign to you.

Using composition, we can [de]construct many functions. Normally, you might use the quotient rule on the above example when deriving, however it is equally valid to treat it like a composition of functions, then use the chain rule to derive it.

The chain rule is defined as:

$(f \circ g)'(x) = (f' \circ g)(x) \cdot g'(x) = f'(g(x)) \cdot g'(x)$.

Often you will find one rule easier to use than the other, and you slowly learn which would be faster as you do more exercises.


Information about the chain rule can be found here, it's basically the way of differentiating composite functions, and hence is massively useful in all of differential calculus where most functions are composites of composites of ... etc... of functions, so the chain rule is useful. It basically states that the derivative of a function $$h(x) = f(g(x))$$ is given by $$h'(x) = f'(g(x)) \cdot g'(x)$$ where the notation $f'(x)$ refers to the derivative of the function $f(x)$ with respect to $x$.


The other answers focus on what the chain rule is and on how mathematicians view it. But you've asked what it's good for. The answer lies in the applications of calculus, both in the word problems you find in textbooks and in physics and other disciplines that use calculus. I searched for "chain rule application problems" and found a few sites that might help you.

Here's part of an example from http://www.ugrad.math.ubc.ca/coursedoc/math100/notes/derivative/chainap.html

Example 2: Chemistry and The Ideal Gas Law

The properties of gases have been studied for centuries, and it has been found that many gases satisfy an approximate relationship called the Ideal Gas Law which states that

$$PV = n R T .$$

Suppose that a 1 litre size gas cylinder containing 100 moles of oxygen gas has been carelessly placed near a radiator, so that its temperature rises at the rate of 2 degrees per minute. At what rate will the pressure build up in the cylinder?

You will find some nice examples here, too: http://www.ugrad.math.ubc.ca/coursedoc/math102/2011/keshet.notes/Chapter7.pdf


It is sometimes easier to find functions with respect to something that is not what you use to derivate.

Say for example you want to measure the acceleration $a$ of a race car on a race track. Say you can measure the speed $v$ of the car at known positions $x$ on the track.

The result of your measurements would be discrete values for $v$ depending at the positions $x$ that you measured it at. Let's say you somehow create a function out of those discrete values. (for example by fitting a curve to the data points). You now have a function of the speed $v$ with respect to $x$, like so: $v(x)$.

Remember the goal: the acceleration $a$ of the car is what you want to know. this is defined as $$a=\frac{dv}{dt}$$

What is the derivative of $v$ with respect to $t$? $v$ does not depend on $t$. Is $v$ a constant value in respect to $t$? Certainly not. The race car did have a different speed at different times. What's also certain is that the race car changed its position over time, which means that its Position is a function of time: $x(t)$

And this is the somewhat "indirect" way that $v$ changes with respect to $t$, because $x$ does. If you now expand the original fraction with $dx$, you get:


Which is the formula of the chain rule.


Ideas form the chain rule are used throughout, deeper integration is fundamentally based on it. But the main use of it is to be able to differentiate a function within a function (within a function...). It is also easy to identify the differential of an expression from the chain rule, as the format is eye catching. This comes up in integration by parts in a case where you might have to spot what something integrates to.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .