Source: algebrica.org - CC BY-NC 4.0 https://algebrica.org/the-derivative-of-a-composite-function/ Fetched from algebrica.org post 6132; source modified 2026-03-06T21:00:41.
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$:
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:
Proof
To prove that $D[f(g(x))] = f’(g(x)) \cdot g’(x)$ we calculate the following limit:
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:
Multiplying both the numerator and the denominator by $\Delta z$, we get:
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:
Example 1
Let’s compute the derivative of the following composite function:
In this case, we have:
- The inner function $g(x) = 3x^2 + 2x$
- The outer function $f(t) = \sin(t)$, where $t = g(x) = 3x^2 + 2x$
The outer function is $f(t) = \sin(t)$. Its derivative is:
Substituting $t = g(x)$:
The inner function is $g(x) = 3x^2 + 2x$. Its derivative is:
Applying the chain rule we obtain:
The result is:
Explore the case of composite power functions, specifically the calculation of the derivative of functions of the type:
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:
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(\cdots f_n(x)\cdots))$, the derivative is given by the product:
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^{3x})$. The composition involves three functions:
Applying the chain rule from the outside inward we obtain:
Example 2
Consider the following function:
The composition involves three functions:
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$:
The derivative of the middle function $g(t) = e^t + 1$ is $g’(t) = e^t$, evaluated at $t = h(x) = x^2$:
The derivative of the inner function $h(x) = x^2$ is:
Applying the chain rule from the outside inward:
The result is:
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