Derivative of a Composite Function
The chain rule
Let $g$ be differentiable at $x$, and let $f$ be differentiable at $z = g ( x )$. Then the composite function $y = f ( g ( x ) )$ is differentiable at $x$, and its derivative is the product of the derivative of $f$ evaluated at $g ( x )$ and the derivative of $g$ at $x$:
\[D [ f ( g ( x ) ) ] = f^{'} ( g ( x ) ) \cdot g^{'} ( x )\]This result is known as the chain rule. It states that to differentiate a composite function, one multiplies the derivative of the outer function, evaluated at the inner function, by the derivative of the inner function.
In Leibniz notation, if $y = f ( u )$ and $u = g ( x )$, the chain rule takes the form:
\[\frac{d y}{d x} = \frac{d y}{d u} \cdot \frac{d u}{d x}\]Proof
To prove that $D [ f ( g ( x ) ) ] = f^{‘} ( g ( x ) ) \cdot g^{‘} ( x )$ we calculate the following limit:
\[D [ f ( g ( x ) ) ] = \underset{h \rightarrow 0}{lim} \frac{f ( g ( x + h ) ) - f ( g ( x ) )}{h}\]Let $z = g ( x )$, then $g ( x + h ) - g ( x ) = \Delta z .$ This implies that $g ( x + h ) = g ( x ) + \Delta z .$ The limit becomes:
\[D [ f ( g ( x ) ) ] = \underset{h \rightarrow 0}{lim} \frac{f ( z + \Delta z ) - f ( z )}{h}\]Multiplying both the numerator and the denominator by $\Delta z$, we get:
\[D [ f ( g ( x ) ) ] & = \underset{h \rightarrow 0}{lim} \frac{f ( z + \Delta z ) - f ( z )}{\Delta z} \cdot \frac{\Delta z}{h} \\ & = \underset{h \rightarrow 0}{lim} \frac{f ( z + \Delta z ) - f ( z )}{\Delta z} \cdot \frac{g ( x + h ) - g ( x )}{h} \\ & = f^{'} ( z ) \cdot g^{'} ( x ) \\ & = f^{'} ( g ( x ) ) \cdot g^{'} ( x )\]This argument assumes $\Delta z \neq 0$ for $h$ sufficiently small. A complete proof handles the case $\Delta z = 0$ separately via an auxiliary function; the conclusion is the same.
In the case of powers of a function, the rule generalizes as follows:
\[D [ f ( x )^{a} ] = a [ f ( x ) ]^{a - 1} f^{'} ( x )\]Example 1
Let’s compute the derivative of the following composite function:
\[y = f ( g ( x ) ) = sin ( 3 x^{2} + 2 x )\]In this case, we have:
- The inner function $g ( x ) = 3 x^{2} + 2 x$
- The outer function $f ( t ) = sin ( t )$, where $t = g ( x ) = 3 x^{2} + 2 x$
The outer function is $f ( t ) = sin ( t )$. Its derivative is:
\[f^{'} ( t ) = cos ( t )\]Substituting $t = g ( x )$:
\[f^{'} ( g ( x ) ) = cos ( 3 x^{2} + 2 x )\]The inner function is $g ( x ) = 3 x^{2} + 2 x$. Its derivative is:
\[g^{'} ( x ) = 6 x + 2\]Applying the chain rule we obtain:
\[D [ f ( g ( x ) ) ] = f^{'} ( g ( x ) ) \cdot g^{'} ( x )\]The result is:
\[( 6 x + 2 ) cos ( 3 x^{2} + 2 x )\]Explore the case of composite power functions, specifically the calculation of the derivative of functions of the type: \(D [ f ( x )^{g ( x )} ]\)
Extension to multiple compositions
The chain rule can be extended to compositions involving three or more functions. For example, given $y = f ( g ( h ( x ) ) )$, the derivative is:
\[D [ f ( g ( h ( x ) ) ) ] = f^{'} ( g ( h ( x ) ) ) \cdot g^{'} ( h ( x ) ) \cdot h^{'} ( x )\]Each factor represents the derivative of a function in the composition, evaluated at the composition of all subsequent functions. This pattern generalises to any finite number of nested functions. For $y = f_{1} ( f_{2} ( \hdots f_{n} ( x ) \hdots ) )$, the derivative is given by the product:
\[f_{1}^{'} ( f_{2} ( \hdots f_{n} ( x ) \hdots ) ) \cdot f_{2}^{'} ( f_{3} ( \hdots f_{n} ( x ) \hdots ) ) \hdots f_{n - 1}^{'} ( f_{n} ( x ) ) \cdot f_{n}^{'} ( x )\]In practical applications, differentiation proceeds from the outermost function inward, with each derivative computed in sequence and the results multiplied together.
As an example, consider $y = sin ( e^{3 x} )$. The composition involves three functions:
\[h ( x ) & = 3 x \\ g ( t ) & = e^{t} \\ f ( s ) & = sin ( s )\]Applying the chain rule from the outside inward we obtain:
\[D [ sin ( e^{3 x} ) ] & = cos ( e^{3 x} ) \cdot e^{3 x} \cdot 3 \\ & = 3 e^{3 x} cos ( e^{3 x} )\]Example 2
Consider the following function:
\[y = ln ( e^{x^{2}} + 1 )\]The composition involves three functions:
\[h ( x ) & = x^{2} \\ g ( t ) & = e^{t} + 1 \\ f ( s ) & = ln ( s )\]The derivative of the outer function $f ( s ) = ln ( s )$ is $f^{‘} ( s ) = \frac{1}{s}$, evaluated at $s = g ( h ( x ) ) = e^{x^{2}} + 1$:
\[f^{'} ( g ( h ( x ) ) ) = \frac{1}{e^{x^{2}} + 1}\]The derivative of the middle function $g ( t ) = e^{t} + 1$ is $g^{‘} ( t ) = e^{t}$, evaluated at $t = h ( x ) = x^{2}$:
\[g^{'} ( h ( x ) ) = e^{x^{2}}\]The derivative of the inner function $h ( x ) = x^{2}$ is:
\[h^{'} ( x ) = 2 x\]Applying the chain rule from the outside inward:
\[D [ ln ( e^{x^{2}} + 1 ) ] & = \frac{1}{e^{x^{2}} + 1} \cdot e^{x^{2}} \cdot 2 x \\ & = \frac{2 x e^{x^{2}}}{e^{x^{2}} + 1}\]The result is:
\[\frac{2 x e^{x^{2}}}{e^{x^{2}} + 1}\]Selected references
- Harvard University, O. Knill. Chain Rule
- MIT OpenCourseWare, G. Strang. Derivatives by the Chain Rule
- University of Toronto, J. Campesato. Differentiability and the Chain Rule