◀ Back to Note

Tony's Intertwingled Memex • Reference Manual

Chain Rule

Formulas & Definitions
Core Definition

The Chain Rule computes the derivative of a composite function. If y=f(g(x))y = f(g(x))y=f(g(x)), then: Prime Notation:

ddx[f(g(x))]=f′(g(x))⋅g′(x)\frac{d}{dx}[f(g(x))] = f'(g(x)) \cdot g'(x)dxd​[f(g(x))]=f′(g(x))⋅g′(x)
Leibniz Notation: Letting u=g(x)u = g(x)u=g(x) and y=f(u)y = f(u)y=f(u):
dydx=dydu⋅dudx\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx}dxdy​=dudy​⋅dxdu​
For a three-layer composite function y=f(g(h(x)))y = f(g(h(x)))y=f(g(h(x))) with u=g(v)u = g(v)u=g(v) and v=h(x)v = h(x)v=h(x):
dydx=dydu⋅dudv⋅dvdx\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dv} \cdot \frac{dv}{dx}dxdy​=dudy​⋅dvdu​⋅dxdv​

Concept Explanation

The Chain Rule describes how rates of change propagate through nested dependent systems. If variable yyy changes AAA times faster than uuu, and uuu changes BBB times faster than xxx, then the total sensitivity of yyy relative to xxx is the multiplicative product A×BA \times BA×B.

The "Peeling the Onion" Mental Model

When evaluating a composite derivative, differentiate from the outside inward:

  1. Differentiate the outer shell, preserving the interior argument completely intact. Never differentiate the inside function on this first step.
  2. Multiply by the derivative of the inner argument.
  3. For multi-layer systems (f(g(h(x)))f(g(h(x)))f(g(h(x)))), repeat the process step-by-step until the innermost variable (xxx) is reached.

Leibniz Notation vs. Prime Notation

Operational Feature Leibniz Notation (dydu⋅dudx\frac{dy}{du}\cdot\frac{du}{dx}dudy​⋅dxdu​) Prime Notation (f′(g(x))⋅g′(x)f'(g(x))\cdot g'(x)f′(g(x))⋅g′(x))
Primary Strength Explicitly tracks rates with respect to physical units and intermediate variables. Fast, compact shorthand for algebraic calculations on paper.
Variable Tracking Introduces named intermediate variables (u,v,zu, v, zu,v,z). Tracks nested positions directly without auxiliary variables.
Engineering Context Preferred in physics, thermodynamics, and multi-stage control loops. Preferred in single-variable algebraic transformations.

Engineering Applications

  • Electrical Engineering (Thermal Drift in Timing Circuits): When capacitor voltage decays over time V(t)=V0e−t/τV(t) = V_0 e^{-t/\tau}V(t)=V0​e−t/τ while clock speed varies with temperature t(θ)t(\theta)t(θ), the temperature sensitivity is governed by dVdθ=dVdt⋅dtdθ\frac{dV}{d\theta} = \frac{dV}{dt} \cdot \frac{dt}{d\theta}dθdV​=dtdV​⋅dθdt​ (see RC Circuit Transient Surge (Electrical Engineering)).
  • Aerospace Engineering (Atmospheric Drag Force): Aerodynamic drag force FdF_dFd​ depends on atmospheric air density ρ\rhoρ, density depends on altitude zzz, and altitude depends on burn-time ttt. The time rate of change of drag force requires a three-layer chain: dFddt=dFddρ⋅dρdz⋅dzdt\frac{dF_d}{dt} = \frac{dF_d}{d\rho} \cdot \frac{d\rho}{dz} \cdot \frac{dz}{dt}dtdFd​​=dρdFd​​⋅dzdρ​⋅dtdz​ (see Atmospheric Density and Aerodynamic Drag (Aerospace Engineering)).
  • Robotics & Actuator Kinematics: Converting linear Cartesian actuator positions to rotational joint angles requires chain-differentiating inverse trigonometric functions (see Robotic Kinematics & Angular Velocity Mapping (Mechanical Engineering)).

Example Problems

Example 1: Two-Layer Leibniz Notation

Find the derivative of y=11+x5y = \frac{1}{\sqrt{1 + x^5}}y=1+x5​1​ with respect to xxx using Leibniz notation.

Solution

Step 1: Pre-process with negative and rational exponents Rewrite the function in power form:

y=(1+x5)−12y = (1 + x^5)^{-\frac{1}{2}}y=(1+x5)−21​

Step 2: Define the intermediate variable uuu Let u=1+x5u = 1 + x^5u=1+x5, so y=u−12y = u^{-\frac{1}{2}}y=u−21​.

Step 3: Differentiate both components Using the Power Rule:

dydu=−12u−32,dudx=5x4\frac{dy}{du} = -\frac{1}{2}u^{-\frac{3}{2}}, \qquad \frac{du}{dx} = 5x^4dudy​=−21​u−23​,dxdu​=5x4

Step 4: Combine via the Chain Rule

dydx=dydu⋅dudx=(−12u−32)(5x4)=−5x42u−32\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx} = \left(-\frac{1}{2}u^{-\frac{3}{2}}\right)(5x^4) = -\frac{5x^4}{2}u^{-\frac{3}{2}}dxdy​=dudy​⋅dxdu​=(−21​u−23​)(5x4)=−25x4​u−23​

Step 5: Back-substitute uuu and post-process into radical form

dydx=−5x42(1+x5)32=−5x42(1+x5)3\frac{dy}{dx} = -\frac{5x^4}{2(1 + x^5)^{\frac{3}{2}}} = -\frac{5x^4}{2\sqrt{(1 + x^5)^3}}dxdy​=−2(1+x5)23​5x4​=−2(1+x5)3​5x4​

Example 2: Three-Layer Composite Function (Prime Notation)

Find the derivative of h(x)=cos⁡4(3x2−1)h(x) = \cos^4(3x^2 - 1)h(x)=cos4(3x2−1) with respect to xxx.

Solution

Step 1: Identify the nested structural layers

  • Outer layer: [u]4[u]^4[u]4
  • Middle layer: cos⁡(v)\cos(v)cos(v)
  • Inner layer: v=3x2−1v = 3x^2 - 1v=3x2−1

Step 2: Differentiate the outer power layer By the Power Rule, bring down the exponent 4, reduce the power to 3, and keep the entire interior untouched:

h′(x)=4cos⁡3(3x2−1)⋅ddx[cos⁡(3x2−1)]h'(x) = 4\cos^3(3x^2 - 1) \cdot \frac{d}{dx}[\cos(3x^2 - 1)]h′(x)=4cos3(3x2−1)⋅dxd​[cos(3x2−1)]

Step 3: Differentiate the middle trigonometric layer The derivative of cos⁡(v)\cos(v)cos(v) is −sin⁡(v)-\sin(v)−sin(v), leaving the innermost argument untouched:

h′(x)=4cos⁡3(3x2−1)⋅(−sin⁡(3x2−1))⋅ddx[3x2−1]h'(x) = 4\cos^3(3x^2 - 1) \cdot \left(-\sin(3x^2 - 1)\right) \cdot \frac{d}{dx}[3x^2 - 1]h′(x)=4cos3(3x2−1)⋅(−sin(3x2−1))⋅dxd​[3x2−1]

Step 4: Differentiate the inner polynomial layer

ddx[3x2−1]=6x\frac{d}{dx}[3x^2 - 1] = 6xdxd​[3x2−1]=6x

Step 5: Multiply all factors and simplify coefficients

h′(x)=4⋅(−sin⁡(3x2−1))⋅6x⋅cos⁡3(3x2−1)=−24xcos⁡3(3x2−1)sin⁡(3x2−1)h'(x) = 4 \cdot (-\sin(3x^2 - 1)) \cdot 6x \cdot \cos^3(3x^2 - 1) = -24x \cos^3(3x^2 - 1)\sin(3x^2 - 1)h′(x)=4⋅(−sin(3x2−1))⋅6x⋅cos3(3x2−1)=−24xcos3(3x2−1)sin(3x2−1)


Connections & References

  • Parent Concepts: Derivatives
  • Prerequisites: Power Rule, Negative and Rational Exponents, Logarithmic and Exponential Properties
  • Transcendental Implementations: Derivatives of Exponential Functions, Derivatives of Logarithmic Functions, Derivatives of Inverse Trigonometric Functions, Derivatives of Trigonometric Functions
  • Advanced Extensions: Implicit Differentiation, Related Rates
  • Course Sessions: Calc-1 Session 08, Calc-1 Session 09