CALCULUS 1 • DERIVATIVES: COMPOSITE, IMPLICIT & INVERSE

Chain Rule

The essential technique for differentiating composite functions — functions built inside other functions.

Historical Context & Motivation

Calculus was born from the desire to understand change — how objects move, how curves bend, and how quantities grow. Early mathematicians like Newton and Leibniz developed powerful rules for finding derivatives of simple functions such as polynomials and trigonometric expressions. However, real-world problems rarely involve simple functions standing alone. Instead, they involve composite functions — situations where one function is nested inside another. For example, the temperature of a cooling object depends on time through an exponential expression wrapped around a linear one. To differentiate such nested expressions, mathematicians needed a new tool: the Chain Rule.

1676
Leibniz's Notation
Gottfried Wilhelm Leibniz introduced the notation dy/dx for derivatives. His fractional notation made it natural to think of chain-like cancellation — dy/dx = (dy/du) × (du/dx) — planting the seed for the Chain Rule.
1684
First Published Calculus
Leibniz published the first paper on differential calculus. Within this framework, he implicitly used the Chain Rule when differentiating compound expressions, though he did not state it as a separate theorem.
1748
Euler Formalizes Composite Functions
Leonhard Euler clarified the concept of a function of a function in his influential textbook Introductio in Analysin Infinitorum. His work helped establish the modern idea of function composition, making the Chain Rule easier to state and teach.
1800s
Rigorous Foundations
Augustin-Louis Cauchy and Karl Weierstrass provided rigorous epsilon-delta proofs of the Chain Rule, placing it on solid logical footing. The rule became a standard part of every calculus textbook.

The central question the Chain Rule answers is deceptively simple: if y depends on u, and u depends on x, how fast does y change with respect to x? Without the Chain Rule, you would be stuck — unable to differentiate expressions like sin(x²), e3x, or (5x + 1)7. The Chain Rule is the bridge that connects the derivative of the outer function to the derivative of the inner function, and it is one of the most frequently used rules in all of calculus.

Core Principles & Definitions

Before you can apply the Chain Rule, you need to understand a few foundational ideas. The Chain Rule is built on the concept of function composition — the process of feeding the output of one function into the input of another. Recognizing when a function is composite is the single most important skill for using this rule correctly.

1

Composite Functions

A composite function f(g(x)) is formed when the output of an inner function g(x) becomes the input of an outer function f. For example, in sin(x²), the inner function is x² and the outer function is sin.
2

Outer vs. Inner

Always identify which function wraps around which. The outer function is the last operation you would perform if you evaluated by hand. The inner function is the argument that gets plugged in first.
3

The Chain Rule Statement

If y = f(g(x)), then dy/dx = f′(g(x)) × g′(x). In words: differentiate the outer function (keeping the inner function unchanged), then multiply by the derivative of the inner function.
4

Leibniz Notation Form

If y depends on u and u depends on x, then dy/dx = (dy/du) × (du/dx). The du terms appear to cancel, which is a helpful memory aid, though it is not literal fraction cancellation.
KEY TAKEAWAY
Think of the Chain Rule like a relay race. Runner 1 (the inner function) sprints at her own speed, then hands off the baton to Runner 2 (the outer function), who sprints at his own speed. The total rate of change is the product of both runners' speeds. If the inner function changes 3 times as fast as x, and the outer function changes 5 times as fast as the inner function, then the overall rate of change is 3 × 5 = 15 times as fast as x.

Visual Explanation

The diagram below illustrates how the Chain Rule works as a pipeline. An input x flows through the inner function g, producing an intermediate value u = g(x). That intermediate value then flows through the outer function f, producing the final output y = f(u). The Chain Rule tells us that the rate of change of y with respect to x is found by multiplying the two individual rates together.

The pipeline diagram shows how input x passes through the inner function g to produce u, then through the outer function f to produce y. The overall derivative dy/dx is the product of each stage's individual rate of change.

Notice how each function box has its own derivative shown below it. The inner function g(x) contributes the factor g′(x), while the outer function f(u) contributes f′(u) — but evaluated at u = g(x), not just at u. The final result is simply those two factors multiplied together. This multiplication reflects the idea that rates of change compound through each layer of composition.

Mathematical Framework

The Chain Rule can be stated in two equivalent notations. Both express the same idea, but each has advantages in different situations. The prime notation (Lagrange notation) is compact and great for plugging in specific functions. The Leibniz notation is more visual and helps you see the chain of dependencies clearly.

CHAIN RULE — PRIME NOTATION
d/dx [f(g(x))] = f′(g(x)) × g′(x)
Here, f is the outer function and g is the inner function. You first take the derivative of f evaluated at g(x), then multiply by the derivative of g with respect to x.
CHAIN RULE — LEIBNIZ NOTATION
dy/dx = (dy/du) × (du/dx)
Let u = g(x) be the inner function and y = f(u) be the outer function. The du's appear to cancel like fractions — a useful memory trick, though not a rigorous justification.
GENERALIZED CHAIN RULE (THREE LAYERS)
d/dx [f(g(h(x)))] = f′(g(h(x))) × g′(h(x)) × h′(x)
When three or more functions are composed, you apply the Chain Rule repeatedly. Each layer contributes its own derivative factor, and you work from the outermost function inward. This pattern extends to any number of nested functions.
⚠️ Common Mistake Alert
The most frequent error is forgetting to multiply by the inner derivative. For example, students often write d/dx [sin(3x)] = cos(3x) instead of the correct answer cos(3x) × 3. Always ask yourself: "Is there something other than plain x inside?" If yes, you need the Chain Rule, and you must multiply by the derivative of that inner expression.

Common Chain Rule Patterns

Once you understand the Chain Rule's logic, it helps to memorize the patterns that appear most often. The table below collects the most common composite function forms and their derivatives. In every case, u represents the inner function, and u′ represents du/dx — the derivative of whatever is inside.

Common Chain Rule derivative patterns with u as the inner function
FunctionDerivativeExample
[u]nn × [u]n−1 × u′(3x + 1)5 → 5(3x + 1)4 × 3
sin(u)cos(u) × u′sin(x²) → cos(x²) × 2x
cos(u)−sin(u) × u′cos(5x) → −sin(5x) × 5
eueu × u′e3x → e3x × 3
ln(u)(1/u) × u′ln(x² + 1) → [2x / (x² + 1)]
√(u)[1 / (2√u)] × u′√(4x − 7) → [4 / (2√(4x − 7))]
The solid curve shows y = sin(x²), while the dashed curve shows its Chain Rule derivative y′ = 2x × cos(x²). Notice how the derivative's oscillations grow wider in amplitude because of the 2x multiplier — this is the inner derivative at work.

The graph above reinforces a key point: the Chain Rule doesn't just tell you the slope — it shows you how the inner function's rate of change amplifies or dampens the outer function's rate of change. In the case of sin(x²), the factor of 2x from differentiating the inner function x² causes the derivative to grow in magnitude as x increases, even though the sine function alone would stay bounded between −1 and 1.

Worked Example

Let's work through a complete Chain Rule problem step by step. We will differentiate y = (2x³ − 5x + 1)4, identifying the inner and outer functions, applying the rule, and simplifying.

Differentiate y = (2x³ − 5x + 1)⁴
1
Step 1 — Identify Inner and Outer FunctionsThe inner function is the expression inside the parentheses: u = 2x³ − 5x + 1. The outer function is the fourth power: f(u) = u⁴. If you imagine evaluating y by hand, you would first compute 2x³ − 5x + 1, then raise the result to the fourth power.
Inner: u = 2x³ − 5x + 1, Outer: f(u) = u⁴
2
Step 2 — Differentiate the Outer FunctionApply the power rule to f(u) = u⁴. The derivative is f′(u) = 4u³. Importantly, we leave u untouched inside — we do not replace it with (2x³ − 5x + 1) yet. We get f′(u) = 4(2x³ − 5x + 1)³.
f′(g(x)) = 4(2x³ − 5x + 1)³
3
Step 3 — Differentiate the Inner FunctionNow differentiate u = 2x³ − 5x + 1 with respect to x using basic derivative rules. The derivative of 2x³ is 6x², the derivative of −5x is −5, and the derivative of 1 is 0.
g′(x) = 6x² − 5
4
Step 4 — Multiply the Two DerivativesThe Chain Rule says dy/dx = f′(g(x)) × g′(x). Substituting the results from Steps 2 and 3, we get:
dy/dx = 4(2x³ − 5x + 1)³ × (6x² − 5)
5
Step 5 — Verify ReasonablenessA quick sanity check: the original function is a polynomial raised to the 4th power, so the result should be a polynomial expression multiplied by the derivative of the inside. Our answer has the form (something)³ × (derivative of inside), which matches the expected structure. You could also check a specific value: at x = 0, y = 1⁴ = 1, and dy/dx = 4(1)³ × (−5) = −20. This negative slope is consistent with the function decreasing at x = 0.
Verified: structure and spot-check at x = 0 are consistent ✓

When to Use the Chain Rule — And When You Don't Need It

One of the trickiest parts of learning the Chain Rule is knowing when to apply it. A helpful decision test is this: look at what's inside each function. If the argument is anything other than a plain x, you need the Chain Rule. The table below compares situations that do and do not require it.

Quick reference: does this function need the Chain Rule?
FunctionChain Rule Needed?Reasoning
sin(x)NoThe argument is just x — no inner function to differentiate.
sin(3x)YesThe argument is 3x, not plain x. Inner derivative is 3.
x⁵NoPower rule applies directly — the base is plain x.
(x² + 3)⁵YesThe base is x² + 3, a composite. Inner derivative is 2x.
NoThe exponent is plain x.
eYesThe exponent is x², not plain x. Inner derivative is 2x.
🔍 THE ONE-QUESTION TEST
Before differentiating, ask yourself: "Is there something other than a bare x inside this function?" If the answer is yes — whether it's 3x, x² + 1, sin(x), or anything else — you need the Chain Rule. Think of x as a plain ingredient and anything else as a recipe made from x. If you see a recipe inside another recipe, that's composition, and the Chain Rule is your tool.

Connection to Advanced Topics

The Chain Rule is not just a standalone technique — it's the gateway to several advanced calculus topics. Once you master the basic Chain Rule, you'll see it appear in implicit differentiation, related rates, integration by substitution (u-substitution), and multivariable calculus. The table below previews how the Chain Rule connects to these more advanced ideas.

TopicHow the Chain Rule Appears
Implicit DifferentiationWhen you differentiate y² with respect to x, you treat y as a function of x and apply the Chain Rule: d/dx[y²] = 2y × (dy/dx). The dy/dx factor comes directly from the Chain Rule.
Related RatesProblems like "a balloon's radius grows at 2 cm/s — how fast is its volume changing?" require differentiating V = (4/3)πr³ with respect to time t. Since r is a function of t, the Chain Rule gives dV/dt = 4πr² × (dr/dt).
u-Substitution (Integration)u-substitution is the Chain Rule in reverse. To integrate 2x × cos(x²), you recognize it as the result of a Chain Rule derivative and substitute u = x², reversing the process.
Multivariable Chain RuleIn multivariable calculus, if z = f(x, y) and x and y both depend on t, then dz/dt = (∂f/∂x)(dx/dt) + (∂f/∂y)(dy/dt). This is a generalized version of the single-variable Chain Rule.

Understanding the Chain Rule deeply now will pay dividends throughout your math career. Nearly every differentiation technique you encounter in Calculus 1 and beyond relies on it in some form. When you reach u-substitution in integration, you'll essentially be running the Chain Rule backward — recognizing which composite derivative produced the integrand and undoing the process.

Practice Problems

Test your understanding of the Chain Rule with these five problems. They progress from conceptual understanding to more challenging multi-step applications. Try each one on your own before reading the answer.

PROBLEM 1CONCEPTUAL
Consider the function h(x) = cos(x³). Identify the inner function and the outer function. Then explain in your own words why the derivative of h is not simply −sin(x³).
PROBLEM 2BASIC CALCULATION
Find the derivative of f(x) = (5x − 2)6.
PROBLEM 3INTERMEDIATE
Find the derivative of y = esin(x). This involves a two-layer composition.
PROBLEM 4APPLIED
A particle's position at time t seconds is given by s(t) = √(t² + 9) meters. Find the velocity of the particle at t = 4 seconds. (Velocity is the derivative of position with respect to time.)
PROBLEM 5CRITICAL THINKING
Find the derivative of y = sin²(3x). Hint: this involves the Chain Rule applied twice — there are three nested layers. Carefully identify each layer before differentiating.

Chain Rule — Summary

The Chain Rule is the essential technique for differentiating composite functions — functions nested inside other functions. The rule states that if y = f(g(x)), then dy/dx = f′(g(x)) × g′(x). In Leibniz notation, this becomes dy/dx = (dy/du) × (du/dx). The key steps are: identify the outer function and the inner function, differentiate the outer (leaving the inner unchanged), then multiply by the derivative of the inner function.

The Chain Rule applies whenever the argument of a function is anything other than a plain x — whether it's a power of a composite expression, a trig function with a complex argument, or an exponential with a non-trivial exponent. It generalizes to multiple layers of nesting and serves as the foundation for implicit differentiation, related rates, and u-substitution in integration. Mastering this single rule unlocks nearly every differentiation problem you will encounter in calculus.

Varsity Tutors • Calculus 1 • Chain Rule