1 Definition and Intuition
1.1 Composite functions and the “outer/inner” view
A composite function is built by feeding the output of one function into another. In the common one-variable form, a composite function has the structure \(y=f(g(x))\), where \(g\) is the inner function that transforms the input \(x\), and \(f\) is the outer function that transforms the result \(g(x)\). Differentiation then focuses on how changes in \(x\) propagate through \(g\) and then through \(f\).
1.2 Rate-of-change intuition
The chain rule expresses how the rate of change of a composite quantity relates to the rates of change of its components. If \(g(x)\) changes with \(x\), and then \(f(\cdot)\) changes with its argument, the overall sensitivity of \(f(g(x))\) to \(x\) is the product of those effects. This “multiply the sensitivities” principle is the central intuition behind the formula.
1.3 The standard one-variable chain rule
In its standard one-variable setting, the chain rule states that if \(y=f(g(x))\), then \[ \frac{dy}{dx}=f'(g(x))\cdot g'(x). \] The derivative of the outer function is evaluated at the inner function value \(g(x)\), and it is multiplied by the derivative of the inner function.
1.4 Common notation and conventions
Typical conventions include writing \(y=f(g(x))\), using primes for derivatives with respect to the current variable, and employing parentheses to make the “outer/inner” nesting clear. For instance, the expression \(f'(g(x))\) indicates that \(f'\) is a function of its input, which here is \(g(x)\), not \(x\) directly. In more elaborate formulas, subscripts or differential notation may be used to clarify variables.
2 Core Formulas and Variations
2.1 Basic chain rule (one variable)
2.1.1 Differentiating \(f(g(x))\)
The basic differentiation step is direct:
- Differentiate the outer function \(f\) with respect to its argument.
- Substitute \(g(x)\) for that argument.
- Multiply by the derivative of the inner function \(g'(x)\).
Thus, for \(y=f(g(x))\), \[ y' = f'(g(x))\,g'(x). \]
2.1.2 Differentiating \(f(ax+b)\) as a special case
A frequent special case is an affine inner function: \[ y=f(ax+b). \] Here \(g(x)=ax+b\), so \(g'(x)=a\). The chain rule gives \[ y' = f'(ax+b)\cdot a. \] This form is often used to quickly differentiate scaled and shifted inputs.
2.2 Chain rule for multiple compositions
2.2.1 Nested functions and repeated application
When multiple compositions are present, the chain rule can be applied repeatedly. For example, if \[ y=f(g(h(x))), \] then \[ \frac{dy}{dx}=f'(g(h(x)))\cdot \frac{d}{dx}g(h(x)) = f'(g(h(x)))\cdot g'(h(x))\cdot h'(x). \] The result is a product of derivatives evaluated at the successive inner layers. This pattern extends to any finite nesting.
2.3 Chain rule with implicit differentiation
2.3.1 When \(y\) depends on \(x\) through an implicit relationship
Implicit differentiation is used when \(y\) is not given as an explicit function of \(x\), but the relationship between them is expressed through an equation such as \[ F(x,y)=0. \] In such settings, one differentiates both sides with respect to \(x\), treating \(y\) as a function of \(x\). Whenever a term involves \(y\), derivatives like \(\frac{dy}{dx}\) are introduced via the chain rule. For instance, if \(y\) appears inside another function \(g(y)\), then \[ \frac{d}{dx}g(y)=g'(y)\frac{dy}{dx}. \] After differentiating, the equation is rearranged to solve for \(\frac{dy}{dx}\), when possible.
3 Worked Examples
3.1 Polynomial and rational composites
3.1.1 Differentiating expressions with quotients inside functions
If the composite includes a quotient in the inner part, the chain rule still applies, with the quotient rule used to compute the inner derivative. Consider \[ y = f\!\left(\frac{p(x)}{q(x)}\right). \] Let \(g(x)=\frac{p(x)}{q(x)}\). Then \[ y' = f'(g(x))\,g'(x), \] and \[ g'(x)=\frac{p'(x)q(x)-p(x)q'(x)}{(q(x))^2}, \] assuming \(q(x)\neq 0\) in the region of interest. Substituting these pieces yields a full derivative of the composite.
3.2 Exponential and logarithmic composites
3.2.1 Differentiating \(a^{g(x)}\) and \(\ln(g(x))\)
For exponentials with a variable exponent, \[ y=a^{g(x)} \quad (a>0,\ a\neq 1), \] one convenient approach uses the fact that \(\frac{d}{dx}a^{u}=a^{u}\ln(a)\,u'\). With \(u=g(x)\), \[ y' = a^{g(x)}\ln(a)\,g'(x). \] For a logarithm, \[ y=\ln(g(x)), \] the derivative is \[ y'=\frac{g'(x)}{g(x)}, \] valid where \(g(x)>0\) (and where the derivative expressions are defined).
3.3 Trigonometric composites
3.3.1 Differentiating \(\sin(g(x))\), \(\cos(g(x))\), and \(\tan(g(x))\)
Trigonometric functions combine cleanly with the chain rule. Using standard derivatives:
- If \(y=\sin(g(x))\), then
\[ y'=\cos(g(x))\,g'(x). \]
- If \(y=\cos(g(x))\), then
\[ y'=-\sin(g(x))\,g'(x). \]
- If \(y=\tan(g(x))\), then
\[ y'= \sec^2(g(x))\,g'(x). \] Each formula follows the same structure: derivative of the outer trig function, evaluated at \(g(x)\), multiplied by \(g'(x)\).
3.4 Radical and absolute value composites
3.4.1 Differentiating \(\sqrt{g(x)}\) and \(|g(x)|\) (where differentiable)
For radicals, rewrite \(\sqrt{g(x)}\) as \((g(x))^{1/2}\). If \(y=\sqrt{g(x)}\) and \(g(x)>0\), \[ y'=\frac{1}{2}(g(x))^{-1/2}\,g'(x)=\frac{g'(x)}{2\sqrt{g(x)}}. \] Absolute value requires more care. For \[
| y= | g(x) | , |
|---|
\] one often uses the piecewise derivative: when \(g(x)>0\), \(y=g(x)\) so \(y'=g'(x)\); when \(g(x)<0\), \(y=-g(x)\) so \(y'=-g'(x)\). At points where \(g(x)=0\), differentiability depends on the behavior of \(g\); the derivative may fail to exist if \(g\) crosses zero with nonzero slope.
4 Higher-Order and Advanced Uses
4.1 Second and higher derivatives via the chain rule
4.1.1 Product expansions from repeated differentiation
Because the first derivative of a composite is typically a product, higher derivatives often expand using the product rule. If \[ y' = f'(g(x))\,g'(x), \] then differentiate again: \[ y'' = \frac{d}{dx}\big(f'(g(x))\big)\,g'(x) + f'(g(x))\,g''(x). \] The derivative \(\frac{d}{dx}(f'(g(x)))\) requires the chain rule again: \[ \frac{d}{dx}\big(f'(g(x))\big)=f''(g(x))\,g'(x). \] Combining gives \[ y''=f''(g(x))(g'(x))^2 + f'(g(x))\,g''(x), \] a common second-derivative formula for composites.
4.2 Differentiating parameterized compositions
4.2.1 \( \frac{d}{dx} f(g(x,t)) \) with explicit dependence
If \(t\) is an additional parameter and \(y=f(g(x,t))\) depends on \(x\) through the function \(g\), then \(t\) is treated as constant with respect to \(x\). The chain rule yields \[ \frac{d}{dx}f(g(x,t)) = f'(g(x,t))\cdot \frac{\partial g}{\partial x}(x,t). \] This distinction clarifies when to use ordinary derivatives (with respect to \(x\)) versus partial derivatives (with respect to a parameter like \(t\)).
4.3 Chain rule in differential form
4.3.1 Using \(dy = f'(g(x))\,dg\) for computation
A differential viewpoint can be useful for quick symbolic manipulation. If \(y=f(u)\) with \(u=g(x)\), then \[ dy = f'(u)\,du. \] Substituting \(u=g(x)\) and viewing \(du\) as \(dg\) gives \[ dy = f'(g(x))\,d(g(x)). \] In contexts where one computes approximate changes, this form supports local linearization: small changes in the inner variable produce proportionally small changes in the composite output, scaled by the derivative of the outer function.
5 Chain Rule in Multivariable Calculus
5.1 Gradients and the multivariable chain rule
5.1.1 Composition \(y = f(u(x_1,\dots,x_n))\)
For a scalar output \(y\) depending on a scalar intermediate variable \(u\), which depends on several inputs, \[ y = f(u(x_1,\dots,x_n)), \] the multivariable chain rule connects derivatives through \[ \nabla y = f'(u)\,\nabla u, \] provided \(f\) is differentiable and \(u\) has a gradient at the point considered. Here \(\nabla y\) is a vector of partial derivatives with respect to \((x_1,\dots,x_n)\).
5.2 Vector/matrix form (Jacobian approach)
5.2.1 Jacobians for multi-stage compositions
When the intermediate mapping is vector-valued, Jacobians offer a compact formula. Suppose \[ \mathbf{y} = \mathbf{f}(\mathbf{u}), \quad \mathbf{u}=\mathbf{g}(\mathbf{x}), \] where \(\mathbf{x}\in\mathbb{R}^n\), \(\mathbf{u}\in\mathbb{R}^m\), and \(\mathbf{y}\in\mathbb{R}^k\). The Jacobian matrices satisfy \[ J_{\mathbf{y}}(\mathbf{x}) = J_{\mathbf{f}}(\mathbf{u})\; J_{\mathbf{g}}(\mathbf{x}), \] with evaluation at \(\mathbf{u}=\mathbf{g}(\mathbf{x})\). This multiplication of Jacobians mirrors the one-variable chain rule’s product structure.
5.3 Directional derivatives and chain rule
5.3.1 Differentiating along a curve \( \mathbf{x}(t) \)
To differentiate a multivariable function along a parameterized path \(\mathbf{x}(t)\), consider \[ \mathbf{x}(t)\in\mathbb{R}^n,\quad y = F(\mathbf{x}(t)). \] Then the derivative with respect to \(t\) follows \[ \frac{dy}{dt} = \nabla F(\mathbf{x}(t))\cdot \mathbf{x}'(t), \] which is the directional derivative of \(F\) in the direction of motion \(\mathbf{x}'(t)\). This is a chain rule statement specialized to a one-parameter trajectory.
6 Chain Rule Strategy and Common Pitfalls
6.1 Identifying the inner function correctly
A typical failure point is misreading nesting. The inner function is the part whose output becomes the input to the outer function. Correct identification determines which expression to differentiate first (as the outer derivative) and which to treat as an input variable (as the inner derivative).
6.2 Sign, constant, and parenthesis placement mistakes
Errors often arise from missing factors created by constants inside the inner function. For example, differentiating \(f(3x)\) requires multiplying by \(3\) from the derivative of the inner function. Likewise, sign mistakes occur with inner functions that include subtraction or negative scaling. Parenthesis placement is crucial because \(f(g(x))\) and \(f(g(x)+h(x))\) are structurally different.
6.3 Misapplying the rule to sums vs. products
The chain rule applies to compositions, not merely to expressions with addition or multiplication. If \(y=f(g(x)+h(x))\), the chain rule gives \(f'(\cdot)\) times the derivative of \((g(x)+h(x))\), but if the structure is \(y=f(g(x))+f(h(x))\), the expression is a sum of separate composites and the derivative must be distributed across terms. Distinguishing between “compose then differentiate” and “differentiate each term” avoids misuse.
6.4 Domain and differentiability considerations
6.4.1 Points where \(g'(x)\) or \(f'(g(x))\) may fail to exist
Even if the algebraic expression is well-formed, differentiability depends on the point in question. The chain rule requires differentiability of the inner function at the point and differentiability of the outer function at the corresponding inner value. Additionally, functions like \(\ln(g(x))\) or \(\sqrt{g(x)}\) impose domain restrictions, which can prevent \(g(x)\) from entering the outer function’s differentiable region.
7 Conceptual Extensions and Related Topics
7.1 Chain rule vs. product rule vs. quotient rule
The chain rule handles composition, while the product rule and quotient rule handle multiplication and division of functions of the same variable. In practice, derivatives of complex expressions often combine these rules: for example, a product of composites requires applying the product rule, and each composite factor requires the chain rule internally. Recognizing which rule matches the outermost structure of the expression is a key organizational skill.
7.2 Chain rule with inverse functions
7.2.1 Differentiating using \( (f^{-1})'(x) = 1 / f'(f^{-1}(x)) \)
When \(f\) is invertible and differentiable with a nonzero derivative, the derivative of the inverse can be expressed using the chain rule. Let \(y=f^{-1}(x)\), so \(f(y)=x\). Differentiating both sides with respect to \(x\) gives \[ f'(y)\frac{dy}{dx}=1. \] Solving for \(\frac{dy}{dx}\) yields \[ (f^{-1})'(x)=\frac{1}{f'(f^{-1}(x))}. \] This formula is consistent with how “undoing” a function transforms rate of change.
7.3 Chain rule in series expansions (brief connections)
7.3.1 Local linear approximation and derivatives
Derivatives describe local behavior through approximation. For a composite \(y=f(g(x))\), the chain rule determines how local changes in \(x\) translate into local changes in \(y\). Near a point, one can view \(g(x)\) as changing approximately linearly with slope \(g'(x_0)\), and then \(f\) as responding to its input with slope \(f'(g(x_0))\). The combined effect is captured by the product structure of the chain rule, aligning the derivative with the best local linear prediction of the composite’s variation.