MathematicsCalculusMedium

Chain Rule

Also known as:composite function rulefunction of a function rule

The chain rule is a differentiation rule used to compute the derivative of a composite function, stating that the derivative of f(g(x)) equals the derivative of the outer function evaluated at the inner function, multiplied by the derivative of the inner function. It is one of the most widely applied rules in calculus, essential whenever a function is "nested" inside another. The chain rule is critical in physics for related rates problems, in machine learning for backpropagation, and in multivariable calculus for total derivatives.

Key Formula

d/dx[f(g(x))] = f'(g(x)) · g'(x)

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

SymbolMeaningUnit
f(g(x))composite function (f applied to g(x))dimensionless
f'(g(x))derivative of outer function evaluated at g(x)dimensionless
g'(x)derivative of the inner functiondimensionless

Worked Example

Problem

Differentiate h(x) = sin(3x²).

Solution

Step 1: Identify the composite structure: outer function f(u) = sin(u), inner function g(x) = 3x². Step 2: Find derivative of outer function: f'(u) = cos(u). Step 3: Find derivative of inner function: g'(x) = 6x. Step 4: Apply chain rule: h'(x) = f'(g(x)) · g'(x) = cos(3x²) · 6x.

Answer

h'(x) = 6x · cos(3x²)

Chain Rule Applied to Common Composite Functions

Composite Function h(x)Outer f(u)Inner g(x)Derivative h'(x)
sin(2x)sin(u)2x2cos(2x)
(x² + 1)⁵u⁵x² + 15(x² + 1)⁴ · 2x = 10x(x² + 1)⁴
e^(3x)eᵘ3x3e^(3x)
ln(x³)ln(u)3x²/x³ = 3/x
√(x + 1)u^(1/2)x + 11/(2√(x + 1))

Interactive Tools

Wolfram Alpha Chain Rule

Open Tool

Khan Academy: Chain Rule

Open Tool

Desmos Graphing Calculator

Open Tool
Diagram illustrating the chain rule for composite functions

Wikimedia Commons, CC BY-SA

Related Terms

Mathematics

Differentiation

Differentiation is the process of computing the derivative of a function, yielding a new function that expresses the rate of change of the original at every point in its domain. It involves applying systematic rules — such as the power rule, product rule, chain rule, and quotient rule — to transform a given function into its derivative. Differentiation is used extensively in physics for velocity and acceleration, in economics for marginal analysis, and in engineering for optimisation and control systems.

Mathematics

Product Rule (differentiation)

The product rule states that the derivative of the product of two differentiable functions equals the first function times the derivative of the second, plus the second function times the derivative of the first. It is a fundamental rule of differential calculus that prevents the incorrect assumption that the derivative of a product is simply the product of the derivatives. The product rule is used whenever functions are multiplied together and their rate of change is needed, for example in physics when computing power as the product of force and velocity.

Mathematics

Implicit Differentiation

Implicit differentiation is a technique for finding the derivative dy/dx when a relationship between x and y is defined implicitly by an equation, rather than expressed as y = f(x) explicitly. It involves differentiating both sides of the equation with respect to x and applying the chain rule whenever y is differentiated, since y is a function of x. This method is essential for finding slopes of curves defined by circles, ellipses, and other relations that cannot be easily solved for y.

The word "chain" refers to the chain of nested functions whose derivatives are multiplied together. The rule was first stated explicitly by Gottfried Wilhelm Leibniz in the late 17th century and was further developed by Leonhard Euler and other 18th-century mathematicians.

calculuschain-rulecomposite-functionsdifferentiationderivative