OpenStax Calculus 1

Chapter 3: Derivatives

3.8 Implicit Differentiation

Study guide for Calculus Volume 1 (Gilbert Strang, 2016 edition)

Independent study guide. Not affiliated with OpenStax or Rice University.

Big idea

Every derivative so far started from $y$ written explicitly in terms of $x$. Most curves do not come that way. A circle, an ellipse, or a curve like $x^3 + y^3 = 6xy$ is given by an equation relating the two variables, and no single function $y = f(x)$ describes the whole thing, because a vertical line can meet the curve more than once.

Solving for $y$ is sometimes possible and usually unpleasant. For a circle it produces two functions with square roots and a domain restriction; for the cubic above it produces nothing usable at all. Implicit differentiation avoids the solving. You accept that near a given point the curve does define $y$ as some differentiable function of $x$, and you differentiate the equation as it stands.

The one new habit is that every $y$ carries a hidden function of $x$, so differentiating anything containing $y$ triggers the chain rule and leaves behind a factor of $\frac{dy}{dx}$. That is the entire mechanism. The derivative of $y^2$ is $2y\frac{dy}{dx}$, not $2y$, and the derivative of $xy$ needs the product rule with that factor in the second term.

After differentiating, the equation is linear in $\frac{dy}{dx}$: gather those terms on one side, everything else on the other, and divide. The answer usually mentions both $x$ and $y$, which is not a failure to finish. A curve that has two heights above one $x$ needs both coordinates to say which branch you are on and therefore which slope you get.

Decoder

To differentiate an equation in $x$ and $y$, apply $\frac{d}{dx}$ to both sides, treat $y$ as a differentiable function of $x$ so that each $y$ term produces a factor of $\frac{dy}{dx}$, and then solve the resulting linear equation for $\frac{dy}{dx}$.

“Both sides” is literal. An equation stays an equation when you differentiate it, so the two sides are handled independently and the equals sign is preserved. A constant side differentiates to zero, which is why circle equations collapse so quickly.

“Treat $y$ as a function of $x$” is the sentence doing the work. Under that reading, $y^3$ is a composition: an outer cubing function applied to an inner function of $x$. The chain rule gives $3y^2$ times the derivative of the inner function, and the derivative of the inner function is exactly $\frac{dy}{dx}$, which has no simpler form yet.

The classic mistake is differentiating $y$ terms as if $y$ were a constant, which loses every $\frac{dy}{dx}$ and produces an equation that is not the derivative of anything. The second most common is forgetting the product rule on a mixed term such as $xy$ or $x^2y$. Before solving, count: each $y$ that was differentiated must have left a $\frac{dy}{dx}$ behind.

Definitions and results

Implicit relation. An equation in $x$ and $y$ whose solution set is a curve. It defines $y$ implicitly as a function of $x$ near any point where the curve is locally the graph of a function.

The method. Differentiate both sides with respect to $x$; apply the chain rule to every term containing $y$; collect the $\frac{dy}{dx}$ terms on one side; factor and divide.

Powers of $y$. For any exponent $n$,

$$ \frac{d}{dx}y^{\,n} = n y^{\,n-1}\frac{dy}{dx} $$

Mixed terms. A product of $x$ and $y$ needs the product rule as well as the chain rule:

$$ \frac{d}{dx}(xy) = y + x\frac{dy}{dx}, \qquad \frac{d}{dx}\big(x^2y\big) = 2xy + x^2\frac{dy}{dx} $$

Functions of $y$. The same rule applies to any outer function: $\frac{d}{dx}\sin y = \cos y \cdot \frac{dy}{dx}$, and likewise for roots, reciprocals and the rest.

Form of the answer. The result is generally a formula in both variables. To evaluate a slope you need a point that actually lies on the curve, so check that the point satisfies the original equation before substituting.

Vertical and horizontal tangents. The tangent is horizontal where the numerator of $\frac{dy}{dx}$ vanishes and the denominator does not, and vertical where the denominator vanishes and the numerator does not. Both conditions are read off the formula without further work.

Tangent and normal lines. At a point $(x_0, y_0)$ on the curve with slope $m$, the tangent is $y - y_0 = m(x - x_0)$ and the normal is $y - y_0 = -\frac{1}{m}(x - x_0)$ when $m \ne 0$.

Second derivatives. Differentiating $\frac{dy}{dx}$ again produces new $\frac{dy}{dx}$ factors, which you replace with the first-derivative formula already found, then simplify using the original equation.

Worked examples

A circle, with tangent and normal

Differentiate $x^2 + y^2 = 25$ term by term:

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

At the point $(3,4)$, which lies on the circle since $9 + 16 = 25$, the slope is $-3/4$. The tangent line is

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

The normal line has slope $4/3$ and passes through $(3,4)$, giving $y = \frac{4}{3}x$. That line goes through the origin, which is the check worth noticing: the normal to a circle is a radius, so it must aim at the centre.

The formula also reports the shape of the curve. The tangent is horizontal where $x = 0$, at the top and bottom of the circle, and vertical where $y = 0$, at the two sides.

Three terms and a product

Take $x^2 + xy + y^2 = 7$, and note that $(1,2)$ is on the curve since $1 + 2 + 4 = 7$. The middle term needs the product rule:

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

Collect and factor:

$$ \frac{dy}{dx}\,(x + 2y) = -(2x + y) \quad \Longrightarrow \quad \frac{dy}{dx} = -\frac{2x+y}{x+2y} $$

At $(1,2)$ the slope is $-4/5$. The tangent line is $y - 2 = -\frac{4}{5}(x-1)$ and the normal line is $y - 2 = \frac{5}{4}(x - 1)$.

A curve you cannot solve

The curve $x^3 + y^3 = 6xy$ passes through $(3,3)$, since $27 + 27 = 54$ and $6 \cdot 9 = 54$. Differentiating, with the product rule on the right:

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

Move the $\frac{dy}{dx}$ terms left and the rest right:

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

At $(3,3)$ this is $\frac{6 - 9}{9 - 6} = -1$, so the tangent line is $y = -x + 6$. The curve is symmetric in $x$ and $y$, so it is reflected onto itself by the line $y = x$; at $(3,3)$, which lies on that line, a tangent of slope $-1$ is the only one compatible with the symmetry.

A second derivative on the circle

Return to $x^2 + y^2 = 25$ with $\frac{dy}{dx} = -x/y$. Differentiate that quotient, remembering that $y$ is a function of $x$:

$$ \frac{d^2y}{dx^2} = -\frac{y - x\frac{dy}{dx}}{y^2} = -\frac{y - x\left(-\frac{x}{y}\right)}{y^2} = -\frac{y^2 + x^2}{y^3} $$

The original equation now simplifies the numerator to $25$, leaving $\frac{d^2y}{dx^2} = -\frac{25}{y^3}$. On the upper half of the circle $y > 0$ and the second derivative is negative, so that arc is concave down. On the lower half it is concave up. That is what a circle does, which is the sanity check on the algebra.

Practice

First the mechanism. Differentiate a relation, keep the chain rule factors, and solve for the derivative in terms of both variables.

Practice

Generated problems for this section, graded instantly.

Then the lines. Confirm the point is on the curve, evaluate the slope there, and write the tangent and the normal.

Practice

Generated problems for this section, graded instantly.

Quiz

Five items on differentiating implicit relations and on tangent and normal lines to curves defined by equations.

Quiz

5 problems with a score at the end.