Derivative of a Composite Function

The derivative of a composite function f[g(x)] is given by $$ Df[g(x)] = f'[g(x)] \cdot g'(x) $$

This result is known as the chain rule.

The chain rule extends naturally to compositions involving three or more functions, such as \( f(g(h(x))) \). The principle remains the same: differentiate step by step, moving from the outermost function inward.

This is often referred to as the iterated chain rule or the multiple chain rule.

\[ \frac{d}{dx} f(g(h(x))) = f'(g(h(x))) \cdot g'(h(x)) \cdot h'(x) \]

Note. The same method applies if the composition involves four or more functions. Differentiate the outermost function with respect to its argument, then successively multiply by the derivatives of each inner function, always proceeding from the outside inward.

A Practical Example

Example 1

Consider the function:

$$ \sin x^2 $$

Here, \( f(g(x)) \) is the sine function, and \( g(x) = x^2 \).

$$ f(g(x)) = \sin(g(x)) $$ $$ g(x) = x^2 $$

Applying the chain rule gives:

$$ D[\sin(x^2)] = \cos(x^2) \cdot 2x $$

Note. When differentiating \( D[\sin(x^2)] \), you leave the inner function \( x^2 \) unchanged and differentiate only the sine function, which becomes cosine.

Example 2

Now consider a different composite function where the exponent applies to the sine function itself:

$$ \sin^2 x $$

In this case, \( f(x) = (g(x))^2 \) and \( g(x) = \sin(x) \).

$$ f(g(x)) = [g(x)]^2 $$ $$ g(x) = \sin(x) $$

Applying the chain rule yields:

$$ D[(\sin(x))^2] = 2\sin(x) \cdot \cos(x) $$

The Proof

To prove the chain rule, we start from the definition of the derivative, namely, the limit of the difference quotient as \( h \to 0 \):

$$ \lim_{h \rightarrow 0} \frac{f(x+h)-f(x)}{h} $$

In the case of a composite function, the input \( x \) for \( f(x) \) is itself the output of another function \( g(x) \):

$$ x = g(x) $$

Thus, the difference quotient can be rewritten as:

$$ \lim_{h \rightarrow 0} \frac{f(g(x+h))-f(g(x))}{h} $$

Now, the increment of \( g(x) \) can be expressed as:

$$ g(x+h) = g(x) + Δg $$

Substituting this into the quotient gives:

$$ \lim_{h \rightarrow 0} \frac{f(g(x) + Δg) - f(g(x))}{h} $$

We can then multiply and divide by \( g(x+h) - g(x) \):

$$ \lim_{h \rightarrow 0} \left( \frac{f(g(x) + Δg) - f(g(x))}{g(x+h) - g(x)} \right) \cdot \left( \frac{g(x+h) - g(x)}{h} \right) $$

Recognizing that \( Δg = g(x+h) - g(x) \), this becomes:

$$ \lim_{h \rightarrow 0} \left( \frac{f(g(x) + Δg) - f(g(x))}{Δg} \right) \cdot \left( \frac{g(x+h) - g(x)}{h} \right) $$

Note. In this step, we replaced \( g(x+h) - g(x) \) with \( Δg \) since $$ g(x+h) = g(x) + Δg $$ and hence $$ Δg = g(x+h) - g(x) $$

Applying the limit of a product rule, we separate the two limits:

$$ \lim_{h \rightarrow 0} \frac{f(g(x) + Δg) - f(g(x))}{Δg} \cdot \lim_{h \rightarrow 0} \frac{g(x+h) - g(x)}{h} $$

As \( h \to 0 \), we have \( Δg \to 0 \) because \( Δg = g(x+h) - g(x) \).

Thus, we can write:

$$ \lim_{Δg \rightarrow 0} \frac{f(g(x) + Δg) - f(g(x))}{Δg} \cdot \lim_{h \rightarrow 0} \frac{g(x+h) - g(x)}{h} $$

Now, the first factor is simply \( f'(g(x)) \), the derivative of \( f \) evaluated at \( g(x) \), and the second is \( g'(x) \), the derivative of \( g \) evaluated at \( x \).

Thus:

$$ f'(g(x)) \cdot g'(x) $$

which establishes the chain rule.

The Iterated Chain Rule

The derivative of a composite function involving three functions, \( f(g(h(x))) \), is computed by repeatedly applying the chain rule from the outermost function inward: \[ \frac{d}{dx} f(g(h(x))) = f'(g(h(x))) \cdot g'(h(x)) \cdot h'(x) \]

In other words, first differentiate the outer function \( f \) with respect to its argument \( g(h(x)) \).

Then, multiply by the derivative of the middle function \( g \) with respect to its argument \( h(x) \).

Finally, multiply by the derivative of the innermost function \( h \) with respect to \( x \).

Example

Let's work through the composite function:

\[ f(g(h(x))) = e^{(\sin(x))^2} \]

Here, the composition involves three functions:

  • \( h(x) = \sin(x) \) (the innermost function)
  • \( g(x) = x^2 \)
  • \( f(x) = e^x \) (the outermost function)

First, differentiate the outermost function \( f(u) = e^u \) with respect to \( u = (\sin(x))^2 \):

\[ f'(g(h(x))) = e^{(\sin(x))^2} \]

Next, differentiate the middle function \( g(v) = v^2 \) with respect to \( v = \sin(x) \):

\[ g'(h(x)) = 2\sin(x) \]

Finally, differentiate the innermost function \( h(x) = \sin(x) \) with respect to \( x \):

\[ h'(x) = \cos(x) \]

Multiplying all three derivatives together, we obtain:

\[ \frac{d}{dx} f(g(h(x))) = e^{(\sin(x))^2} \times 2\sin(x) \times \cos(x) \]

Thus, the final derivative is:

\[\frac{d}{dx}e^{(\sin x)^2}= 2\,e^{(\sin x)^2}\,\sin x\,\cos x\]

Alternatively, using the trigonometric identity \( \sin(2x) = 2\sin(x)\cos(x) \), we can express the result as:

\[ \frac{d}{dx}e^{(\sin x)^2} = e^{(\sin x)^2}\,\sin(2x) \]

And that's the complete derivation!

 
 

Please feel free to point out any errors or typos, or share suggestions to improve these notes. English isn't my first language, so if you notice any mistakes, let me know, and I'll be sure to fix them.

FacebookTwitterLinkedinLinkedin
knowledge base

Derivatives

Exercises