Skip to content

Cheatsheet: Implicit differentiation

For a relation that ties x and y together (but is not solved for y):

  1. Treat y as a function of x.
  2. Differentiate both sides with respect to x.
  3. Attach a dy/dx to every y term (chain rule): d/dx(y^2) = 2y · dy/dx.
  4. Solve the resulting equation for dy/dx algebraically.

y^2 is really (y(x))^2, a composition, so its derivative is 2·y(x)·y'(x) = 2y·dy/dx. Every y term is a composition; the dy/dx is the chain-rule factor. No new technique.

RelationDifferentiateSolvedy/dx
x^2 + y^2 = 252x + 2y·y' = 0-x/y
xy = 1y + x·y' = 0 (product rule)sub y=1/x-y/x = -1/x^2
x^2 + xy + y^2 = 72x + y + x·y' + 2y·y' = 0-(2x+y)/(x+2y)

Circle check at (3,4): dy/dx = -3/4, perpendicular to the radius (slope 4/3). The hyperbola’s -1/x^2 matches the power rule on 1/x.

When x and y both change with time t under a constraint, differentiate the constraint w.r.t. t:

Ladder x^2 + y^2 = 100: 2x·dx/dt + 2y·dy/dt = 0
base slides out dx/dt = 1 -> top falls dy/dt = -x/y

The two rates are linked by the constraint.

The foundation of methods using constraints or fixed points:

  • Constrained optimization (Lagrange / KKT): how an optimum shifts along a constraint surface.
  • Deep equilibrium models: a layer defined as a fixed point f(z,x)=z; gradients use implicit differentiation.
  • Score-based diffusion: differentiating through the ODEs solved at training time.
  • Forgetting the dy/dx on y terms. d/dx(y^2) = 2y·dy/dx, not 2y.
  • Skipping the product rule on mixed terms. d/dx(xy) = y + x·dy/dx.
  • Trying to solve for y first. Often impossible and unnecessary; differentiate as-is.
  • Confusing dy/dx with dy/dt. Slope (vs x) versus linked rates (vs time t).

To differentiate a relation you cannot solve for y, treat y as a function of x and differentiate everything, letting the chain rule attach a dy/dx to each y term, then solve for dy/dx.