Reading and display settings

Appearance

System follows your operating system and keeps following it, even if you change it later. The header's sun, moon and monitor cycle the same three options.

Text size (%) 100%

Default. Scales every text size on the site, equations and tables included.

Reading width 70ch

How much text runs across one line of prose. Narrower is easier to track; wider fits more on screen.

Line spacing 1.6

The leading on body text. Taller leading helps a tired eye stay on the line.

Density

Padding and gaps around controls, cards, and tables — how much breathing room the layout leaves itself.

Motion

System follows your operating system. Reduced removes every transition on this site. Full keeps them on unless your system asks for less.

1

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$,

$$ x^2 + y^2 = r^2. $$

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:

$$ \frac{d}{dt}\bigl(x^2 + y^2\bigr) = 2x\,\frac{dx}{dt} + 2y\,\frac{dy}{dt} = 0. $$

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

$$ 2x + 2y\,\frac{dy}{dx} = 0 \qquad\Longrightarrow\qquad \frac{dy}{dx} = -\frac{x}{y}, $$

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.

2

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

$$ F_x\,\frac{dx}{dt} + F_y\,\frac{dy}{dt} = 0. $$

With $dx/dt = 1$ this is $F_x + F_y\,y' = 0$, so

$$ \frac{dy}{dx} = -\frac{F_x}{F_y}, \qquad F_y \neq 0. $$

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$.

3

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:

  1. Write the relation that is true at each moment — area, volume, Pythagoras.
  2. Differentiate both sides with respect to $t$, attaching a rate to every changing quantity.
  3. 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.

4

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

$$ F(x,y) = x^3 + y^3 - 3xy = 0. $$

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'$:

$$ 3x^2 + 3y^2\,y' - 3y - 3x\,y' = 0 \qquad\Longrightarrow\qquad y' = \frac{y - x^2}{\,y^2 - x\,}. $$

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)$.

⚠️ At a vertical tangent $F_y = 0$, so $-F_x/F_y$ is undefined — not a failure of the method but the correct answer: $dy/dx \to \pm\infty$.
5

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.

6

Cheat sheet

SituationThe statementWhat 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 curveTangent direction is $(F_y, -F_x)$
Vertical tangent$F_y = 0$Slope is infinite, not zero — check the denominator
7

Further reading

8

Check your understanding

0/4 answered