Ma · Mathematics

What Notation Removes Ambiguity in the Chain Rule?

Published By the 9to5Science editorial team

At a glance

  1. 1. Name the functions

    Write the outer function and inner function separately, such as y = f(u) and u = g(x).

  2. 2. Show the variable

    Use d/dx for differentiation with respect to x, or write the derivative with its argument explicitly.

  3. 3. Apply the rule

    Differentiate the outer function at the inner function, then multiply by the inner function's derivative.

  4. 4. Check dependencies

    For several variables, state which quantities depend on which variables and use partial derivatives where appropriate.

Advertisement

The chain rule can look ambiguous when a formula uses primes without showing which variable is the input. The clearest fix is to name the intermediate quantity and make the differentiation variable explicit. This also helps distinguish the derivative of a function from the derivative of a composition.

Use an intermediate variable

Suppose u=g(x)u=g(x) and y=f(u)y=f(u). Then yy depends on xx through uu, so the chain rule is

dydx=dydududx.\frac{dy}{dx}=\frac{dy}{du}\frac{du}{dx}.

This notation makes the dependency visible: first change uu as xx changes, then change yy as uu changes. In prime notation, the same statement is

ddxf(g(x))=f′(g(x))g′(x).\frac{d}{dx}f(g(x))=f'(g(x))g'(x).

Here f′f' means the derivative of ff with respect to its own input. Since the input to ff is g(x)g(x), evaluate that derivative at g(x)g(x). By contrast, g′(x)g'(x) is the derivative of gg with respect to xx.

Write the operator when the input is easy to confuse

The expression f′(x)f'(x) conventionally means the derivative of ff evaluated at xx. For a composition, writing only “f′f'” can hide where that derivative is evaluated. The operator form

ddx[f(g(x))]\frac{d}{dx}\bigl[f(g(x))\bigr]

shows both the whole expression being differentiated and the variable of differentiation. Brackets are useful when the expression is long or contains nested functions.

You can also define the intermediate variable explicitly and use Leibniz notation. If u=x2+1u=x^2+1 and y=sin⁡uy=\sin u, write

dydx=dydududx.\frac{dy}{dx}=\frac{dy}{du}\frac{du}{dx}.

This is a standard chain-rule notation. It resembles cancellation of the dudu terms, but its justification is the chain rule, not ordinary algebraic cancellation of independent fractions.

Worked example: a nested function

Differentiate y=sin⁡(x2+1)y=\sin(x^2+1) with respect to xx.

Set u=x2+1u=x^2+1, so y=sin⁡uy=\sin u. Differentiate each stage:

dydu=cos⁡u,dudx=2x.\frac{dy}{du}=\cos u, \qquad \frac{du}{dx}=2x.

Multiply and substitute u=x2+1u=x^2+1:

dydx=dydududx=cos⁡(u)(2x)=2xcos⁡(x2+1).\begin{aligned} \frac{dy}{dx} &=\frac{dy}{du}\frac{du}{dx}\\ &=\cos(u)(2x)\\ &=2x\cos(x^2+1). \end{aligned}

Equivalently, use the composition formula directly: f(u)=sin⁡uf(u)=\sin u and g(x)=x2+1g(x)=x^2+1, so f′(g(x))g′(x)=cos⁡(x2+1)(2x)f'(g(x))g'(x)=\cos(x^2+1)(2x). Both notations give the same result, while the intermediate-variable version makes the two differentiation steps especially visible.

Nested chains and multiple stages

For a longer composition, assign a name to every intermediate quantity. For example, if v=h(u)v=h(u), u=g(x)u=g(x), and y=f(v)y=f(v), then

dydx=dydvdvdududx.\frac{dy}{dx}=\frac{dy}{dv}\frac{dv}{du}\frac{du}{dx}.

The order follows the dependency path from xx to yy. In prime notation, the same derivative is f′(h(g(x)))h′(g(x))g′(x)f'(h(g(x)))h'(g(x))g'(x). As chains get longer, Leibniz notation often makes the sequence of dependencies easier to read.

When partial derivatives are needed

If a function depends on more than one independent variable, specify which variable changes. For example, if z=F(x,y)z=F(x,y) and both xx and yy depend on tt, then the total derivative is

dzdt=∂F∂xdxdt+∂F∂ydydt.\frac{dz}{dt}=\frac{\partial F}{\partial x}\frac{dx}{dt}+\frac{\partial F}{\partial y}\frac{dy}{dt}.

The partial derivatives describe how FF changes with one input while holding the other fixed. The total derivative accounts for how both inputs change with tt. Writing d/dtd/dt and ∂/∂x\partial/\partial x deliberately prevents confusion between these two operations.

Common notation mistakes

  • Writing f′(x)f'(x) for the derivative of f(g(x))f(g(x)). The chain-rule term is f′(g(x))f'(g(x)), because that is the input at which the derivative of ff is evaluated.
  • Leaving the differentiation variable unstated. Use d/dxd/dx, dy/dxdy/dx, or a clearly named prime convention when the variable might not be obvious.
  • Treating dy/dudy/du as an ordinary fraction in every context. Leibniz notation is helpful, but the chain rule—not unrestricted fraction cancellation—is what licenses the product of derivatives.
  • Using ordinary derivatives for a genuinely multivariable dependence. Use partial derivatives for a function’s individual inputs and a total derivative when those inputs vary along a parameter.

For a single-variable composition, the safest general-purpose form is ddx[f(g(x))]=f′(g(x))g′(x)\frac{d}{dx}[f(g(x))]=f'(g(x))g'(x). If the symbols still feel crowded, define the intermediate variable and write each derivative with its variable shown.

References

  1. OpenStax, Calculus Volume 1, Section 3.6: The Chain Rule

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.