Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

For a composition of $k$ functions, $F(x) = f_1 \circ f_2 \circ \dots \circ f_k(x)$, (I'm not sure if that is the correct notation for function composition of more than two functions), is there a general formula for finding $F'(x)$?

share|improve this question
the correct notation is $f_1\circ f_2\circ...\circ f_k(x)=F(x)$ –  janmarqz Jan 30 at 1:54
add comment

5 Answers

up vote 5 down vote accepted

Set $f_{k+1}(x)=x$ $$F'(x)=\prod\limits_{i=1}^{k}f'_i(f_{i+1} \circ f_{i+2} \circ \dots \circ f_k(x))$$

share|improve this answer
add comment

I always find it easier to think about the chain rule using Leibniz-style notation. In this style, the usual two step version of the chain rule is this:

$$ \frac{\textrm{d}y}{\textrm{d}x}=\frac{\textrm{d}y}{\textrm{d}u}\cdot\frac{\textrm{d}u}{\textrm{d}x} $$

Now, if $v$ is an intermediate step between $y$ and $u$, then we also have this:

$$ \frac{\textrm{d}y}{\textrm{d}u}=\frac{\textrm{d}y}{\textrm{d}v}\cdot\frac{\textrm{d}v}{\textrm{d}u} $$

Putting the two together gives: $$ \frac{\textrm{d}y}{\textrm{d}x}=\frac{\textrm{d}y}{\textrm{d}v}\cdot\frac{\textrm{d}v}{\textrm{d}u}\cdot\frac{\textrm{d}u}{\textrm{d}x} $$

As an example, suppose we want to find $\frac{\textrm{d}y}{\textrm{d}x}$ where $$y=\sqrt{\sin(2x+1)}$$

Then we can put $u=2x+1$ and $y=\sqrt{\sin(u)}$. It's easy to find $\frac{\textrm{d}u}{\textrm{d}x}$, but $\frac{\textrm{d}y}{\textrm{d}u}$ requires another application of the chain rule. Put $v=\sin(u)$ so that $y=\sqrt{v}$. Now everything is easy:

\begin{eqnarray} \frac{\textrm{d}y}{\textrm{d}x} & = & \frac{\textrm{d}y}{\textrm{d}v}\cdot\frac{\textrm{d}v}{\textrm{d}u}\cdot\frac{\textrm{d}u}{\textrm{d}x} \\ & = & \frac{1}{2\sqrt{v}}\cdot \cos(u) \cdot 2 \\ & = & \frac{\cos(2x+1)}{\sqrt{\sin(u)}} \\ & = & \frac{\cos(2x+1)}{\sqrt{\sin(2x+1)}} \end{eqnarray}

share|improve this answer
And Liebniz notation shows its superiority once again! –  Benjamin Jan 30 at 2:23
@Jens Ummm yes, well. Let's just pretend that I got that right the first time, shall we? –  Unwisdom Jan 30 at 16:47
Yeah, I deleted the comment. Now only Benjamin looks stupid. Mwahahaha. –  Jens Jan 30 at 18:29
add comment

This isn't quite an answer to the question asked, but maybe it's worth something.

Suppose $f(0) = 0$ and $f$ is twice differentiable in a neighborhood of 0. Then $$ (\ \underbrace{f \circ \cdots \circ f }_n\ )''(0) = f''(0)\left( f'(0)^{n-1} + f'(0)^n + \cdots + f'(0)^{2n-2} \right) \text{ for }n \ge 1. $$

I found this $\ldots\ldots$ somewhere $\ldots\ldots$ and I expect it can be proved by induction on $n$.

share|improve this answer
add comment

You can compute it recursively: chain rule (Wikipedia)

To take the derivative of a composite of more than two functions, notice that the composite of f, g, and h (in that order) is the composite of f with g ∘ h.

E.g.: $(f \circ g \circ h)'(a) = f'((g \circ h)(a))\cdot (g \circ h)'(a) = f'((g \circ h)(a))\cdot g'(h(a))\cdot h'(a).$

share|improve this answer
It hadn't occurred to me that the composition of f, g, and h is the same as f with g and h. Thank you. –  MitchKnight Jan 30 at 1:59
add comment

You can group the last $k - 1$ functions and use chain rule on that to get $$ (f_1 \circ (f_2 \circ \dotsb \circ f_k))'(x) = {f_1}'((f_2 \circ \dotsb \circ f_k)(x)) \cdot (f_2 \circ \dotsb \circ f_k)'(x) $$ Now you can repeat the process for $(f_2 \circ \dotsb \circ f_k)'(x)$ to get $$ (f_2 \circ \dotsb \circ f_k)'(x) = {f_2}'((f_3 \circ \dotsb \circ f_k)(x)) \cdot (f_3 \circ \dotsb \circ f_k)'(x) $$ and hence $$ (f_1 \circ (f_2 \circ \dotsb \circ f_k))'(x) = {f_1}'((f_2 \circ \dotsb \circ f_k)(x)) \cdot {f_2}'((f_3 \circ \dotsb \circ f_k)(x)) \cdot (f_3 \circ \dotsb \circ f_k)'(x). $$ We can keep repeating this process until we reach the end when we get the formula given by Yangzhe Lau. You can make this more rigorous by proving it by induction.

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.