LocusBlog

Implicit differentiation, from the circle to the folium

Implicit differentiation gets $dy/dx$ out of an equation that was never solved for $y$. Differentiate both sides with respect to $x$, treat $y$ as a function of $x$ so that every $y$-term picks up a factor of $dy/dx$ by the chain rule, and then solve the resulting linear equation for $dy/dx$.

That is the whole procedure. The one move that makes it work is

$$\frac{d}{dx}\big[y^n\big] = n y^{n-1}\frac{dy}{dx}$$

and its relatives: $\frac{d}{dx}\sin y = \cos y \cdot \frac{dy}{dx}$, $\frac{d}{dx}e^y = e^y\frac{dy}{dx}$. The $y$ is an inside function, so it contributes its own derivative, which happens to be the thing you are solving for.

Why a curve that fails the vertical line test still has a slope

$x^2 + y^2 = 25$ is not a function. Above $x = 3$ there are two points, $(3,4)$ and $(3,-4)$, and no single rule sends $3$ to both. Differentiation, though, is a local operation. Pick one point on the curve, look at a small enough neighbourhood of it, and the piece of curve you see usually is the graph of a function - the top half near $(3,4)$, the bottom half near $(3,-4)$. That local function is differentiable, and $dy/dx$ means its derivative.

The exception is where the local picture is vertical. At $(5,0)$ the curve is not a graph over $x$ in any neighbourhood, no matter how small, and the slope does not exist. The formula below reports that failure honestly by dividing by zero, which is one reason to trust it.

The circle, checked three ways

Differentiate $x^2 + y^2 = 25$ term by term. The $x^2$ gives $2x$. The $y^2$ gives $2y\,dy/dx$. The constant gives $0$.

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

One expression covers both halves of the circle and every point on it except $y = 0$, where it correctly refuses to produce a number. At $(3,4)$ the slope is $-3/4$, and the tangent line is

$$y - 4 = -\frac{3}{4}(x - 3), \qquad y = -\frac{3}{4}x + \frac{25}{4}$$

Check it by solving explicitly. Near $(3,4)$ the curve is $y = \sqrt{25 - x^2}$, so $y' = -x/\sqrt{25-x^2}$, and at $x = 3$ that is $-3/\sqrt{16} = -3/4$. Check it a third way with no calculus at all: the radius from the origin to $(3,4)$ has slope $4/3$, a tangent is perpendicular to the radius, and the negative reciprocal of $4/3$ is $-3/4$. Three routes, one number.

The second derivative comes from differentiating $dy/dx$ again, remembering that $y$ is still a function of $x$. By the quotient rule,

$$\frac{d^2y}{dx^2} = -\frac{y - x\frac{dy}{dx}}{y^2}$$

Substitute $dy/dx = -x/y$ and the expression collapses:

$$\frac{d^2y}{dx^2} = -\frac{y + \frac{x^2}{y}}{y^2} = -\frac{y^2 + x^2}{y^3} = -\frac{25}{y^3}$$

The last step used the original equation, which is allowed and is usually what makes the answer readable. At $(3,4)$, $y'' = -25/64 = -0.3906$. Differentiate $\sqrt{25-x^2}$ twice instead and you get $-25(25-x^2)^{-3/2}$, which at $x = 3$ is $-25/16^{3/2} = -25/64$. The sign is also a sanity check: on the upper half $y > 0$, so $y''$ is negative and the arc is concave down, which is what a circle’s top looks like.

When solving for y is not an option

The folium of Descartes is $x^3 + y^3 = 6xy$. Solving it for $y$ means solving a cubic in $y$ whose coefficients involve $x$, which is possible and useless. Implicit differentiation does not care. Differentiate both sides, using the product rule on the right:

$$3x^2 + 3y^2\frac{dy}{dx} = 6y + 6x\frac{dy}{dx}$$

Collect the $dy/dx$ terms on one side and everything else on the other. This step is always available, because $dy/dx$ enters linearly - the chain rule only ever produces it to the first power.

$$\frac{dy}{dx}\big(3y^2 - 6x\big) = 6y - 3x^2 \qquad\Longrightarrow\qquad \frac{dy}{dx} = \frac{2y - x^2}{y^2 - 2x}$$

The point $(3,3)$ is on the curve: $27 + 27 = 54$ and $6 \cdot 3 \cdot 3 = 54$. There the slope is $(6-9)/(9-6) = -1$.

Check that without differentiating anything. Swapping $x$ and $y$ leaves $x^3 + y^3 = 6xy$ unchanged, so the folium is symmetric about the line $y = x$. The point $(3,3)$ lies on that line, so the tangent there has to be its own mirror image, which forces it perpendicular to $y = x$: slope $-1$. A numerical check agrees - solving the cubic for $y$ at $x = 3 \pm 10^{-5}$ and taking a symmetric difference returns $-1.0000000$.

The term that gets dropped

Every wrong answer here has the same cause: a $y$ was differentiated as if it were a constant, or as if it were $x$. Suppose on the folium you write $3y^2$ for the derivative of $y^3$, forgetting the $dy/dx$, and keep the product rule on the right:

$$3x^2 + 3y^2 = 6y + 6x\frac{dy}{dx} \qquad\Longrightarrow\qquad \frac{dy}{dx} = \frac{3x^2 + 3y^2 - 6y}{6x}$$

At $(3,3)$ that gives $(27 + 27 - 18)/18 = +2$. The true slope is $-1$. The error is not a small numerical drift; it has the wrong sign, so the tangent line it produces climbs where the curve descends, and any related-rates problem built on it concludes that a quantity is growing when it is shrinking.

The same slip on the circle is even louder. Writing $2x + 2y = 0$ gives $y = -x$, which is not a slope at all - it is an equation in the coordinates, and the fact that $dy/dx$ has vanished from the page should stop you before you finish the line. A finished implicit differentiation always has exactly one $dy/dx$, and it is alone on the left.

Two habits prevent it. Write $\frac{dy}{dx}$ in full rather than $y'$ while you are learning, because a prime is small and easy to lose. And check that every term containing $y$ acquired a factor when you differentiated; a term with a $y$ in it and no $dy/dx$ next to it is wrong unless you can say why.

From here the technique goes two places. It gives tangent and normal lines on curves that have no explicit formula, and it powers related rates, where the independent variable is time and every quantity picks up a $d/dt$ the same way $y$ picked up a $dy/dx$. Work through implicit differentiation problems until the bookkeeping is automatic, and read the study guide section for the same material at a slower pace. The chain rule underneath it all is worth a separate pass if the $dy/dx$ factor still feels arbitrary.

References