Implicit differentiation & related rates
Sometimes the curve is handed to you as an equation — $x^2 + y^2 = r^2$, an ellipse, a folium — and solving it for $y$ is either impossible or a trap. You do not have to. Differentiate both sides, let the chain rule do the work, and the slope falls out. The same move connects two rates that a single constraint ties together.
Differentiate the equation
Both sides, one variable at a time, chain rule everywhere
Our running example is the two-link arm from Volume II, but for one part the arm is simple: its tip is required to stay on a curve. Put the tip at $(x, y)$ and require it to lie on the circle of radius $r$,
This is a constraint, not a function. It does not hand you $y$ for a given $x$; it says the two coordinates are not free. To get a slope, remember first that $x$ and $y$ are both functions of time, $x(t)$ and $y(t)$. Differentiate both sides of the equation with respect to $t$. The right-hand side is a constant, so it dies. On the left, $x^2$ is a composition and so is $y^2$, so each pulls a factor of its inner derivative out by the chain rule:
Now we are free to read the same statement two ways. If $x$ is the input, write $dx/dt = 1$ (a unit of $x$ per unit of $x$) and $dy/dt = dy/dx$: the time parameter cancels and
provided $y \neq 0$. That is implicit differentiation: no solving, just differentiate the relation and treat one variable as a function of the other. Drag the tip around the circle and watch the tangent obey it. At the left and right extremes $y = 0$, the slope blows up — the tangent is vertical, and the formula is telling the truth.
Drag the point around the circle (or scrub the angle). The tangent slope is $-x/y$, computed without ever taking a square root.
Any relation, and the gradient is normal
$F(x,y) = c$ has slope $-F_x / F_y$
The circle was special only because we could guess the answer. Write any constraint as a level set of a function, $F(x,y) = c$, and differentiate along a path $(x(t), y(t))$ that stays on the curve. The value of $F$ never changes, so its time derivative is zero, and the multivariable chain rule gives
With $dx/dt = 1$ this is $F_x + F_y\,y' = 0$, so
There is a picture hiding in that equation. The vector $(F_x, F_y)$ is the gradient $\nabla F$; the tangent direction that satisfies $\nabla F \cdot (1, y') = 0$ is $(F_y, -F_x)$. So the gradient is perpendicular — normal — to the level curve, and the tangent is the direction it kills. Switch the curve and drag; the pink arrow is $\nabla F$ and the solid line is the tangent it forces.
A level set of $F$. The gradient (pink) meets the tangent (accent) at a right angle; the numeric slope along the curve agrees with $-F_x/F_y$.
Related rates
One constraint, two rates, one equation
The time form of the same calculation is where it earns its keep. A constraint holds at every instant, so its derivative holds at every instant, and that derivative is an equation between the rates. The steps never change:
- Write the relation that is true at each moment — area, volume, Pythagoras.
- Differentiate both sides with respect to $t$, attaching a rate to every changing quantity.
- Plug in the current state and solve for the one rate you were asked for.
For a growing circle, $A = \pi r^2$ becomes $\dfrac{dA}{dt} = 2\pi r\,\dfrac{dr}{dt}$: the area rate is the circumference times the radius rate. For the ladder, $x^2 + y^2 = L^2$ becomes $2x\,\dfrac{dx}{dt} + 2y\,\dfrac{dy}{dt} = 0$, so the top slides down exactly as fast as the geometry insists. Pick a scenario, set the state and the driving rate, and read the rate the constraint forces.
The state slider sets the current geometry; the rate slider sets one rate. The other rate is whatever makes the constraint's derivative hold.
When you cannot solve for $y$
The folium of Descartes, and a vertical tangent
Here is the case that makes the method necessary rather than convenient. The folium of Descartes is
Try to write it as $y = f(x)$ and you must solve $y^3 - 3xy + x^3 = 0$ for $y$: a cubic, so Cardano's formulas and three branches, only some of them real. Try to invert it any other way and you meet the same wall. Implicit differentiation does not care. Differentiate the relation and solve the linear equation for $y'$:
The denominator is $F_y$, so it vanishes on the vertical tangents, where the slope genuinely blows up. The loop also has two points at most $x$-values, which is exactly why no single-valued $f(x)$ can describe it. Drag the point or scrub $t$; near the vertical tangent the readout runs off to infinity, and the implicit formula is the only thing that can say so.
Parametrised for dragging as $x = 3t/(1+t^3)$, $y = 3t^2/(1+t^3)$; the slope still comes from $-(F_x/F_y)$.
Where this shows up
A constraint is the job description
The move from this part — differentiate a constraint and get an equation among its pieces — is the engine of constrained optimization. When you drag a point along a level set and stop where an objective stops improving, tangency means the two gradients are parallel: $\nabla f = \lambda \nabla g$. That is exactly the picture from Step 2, and it is developed properly in Volume II, Part 7: Lagrange multipliers & KKT. On the machine-learning side the same chain rule written for many variables is nonlinear optimization, where constraints are handled as penalties or as projections back onto a feasible set. Volumes later drop the constraint entirely and let the gradient flow — but every constrained step is this part's equation, rearranged.
Cheat sheet
| Situation | The statement | What to do |
|---|---|---|
| Relation $F(x,y)=c$ | $F_x + F_y\,y' = 0$ | Differentiate both sides in $x$; $y$ drags a factor $y'$ |
| Slope | $y' = -F_x / F_y$ | Valid wherever $F_y \neq 0$ |
| Circle $x^2+y^2=r^2$ | $y' = -x/y$ | $r$ is constant, so its derivative is zero |
| Two rates in time | $F_x\,x' + F_y\,y' = 0$ | Same equation; solve for the requested rate |
| Chain rule mantra | $\dfrac{d}{dt}F(x(t),y(t)) = F_x x' + F_y y'$ | Every occurrence of a changing quantity produces a rate |
| Gradient bookkeeping | $\nabla F \perp$ level curve | Tangent direction is $(F_y, -F_x)$ |
| Vertical tangent | $F_y = 0$ | Slope is infinite, not zero — check the denominator |
Further reading
- 3Blue1Brown, Implicit differentiation — the geometric reason the tangent and gradient disagree by a right angle.
- MIT 18.01, Single Variable Calculus — the related-rates problems this page mechanises.
- Khan Academy, Implicit differentiation — extra practice with the chain-rule bookkeeping.