Calculus · Grade 12 and undergraduate

Implicit Differentiation

Quick answer

An equation such as x² + y² = 25 defines y as a function of x implicitly, without a formula y = f(x). To find dy/dx, differentiate both sides with respect to x, treating y as an unknown function of x: by the chain rule, every term containing y picks up a factor dy/dx. Then solve the resulting equation for dy/dx. The slope usually depends on both x and y, which is what lets one curve have different slopes at points with the same x.

What you'll learn

  • Differentiate an equation implicitly with respect to x
  • Solve for dy/dx and evaluate it at a point
  • Find tangent lines to implicitly defined curves
  • Find a second derivative implicitly

When y is not solved for

The circle x2+y2=25x^2 + y^2 = 25 is not the graph of a single function: each xx between −5-5 and 55 has two yy values. Near any one point, though, the circle is the graph of some function — the top half is y=25−x2y = \sqrt{25 - x^2} — and it has a tangent line.

A circle and its tangent line at (3, 4) The circle x squared plus y squared equals 25, centered at the origin with radius 5, and the tangent line through the point (3, 4) with slope −3/4. -6-4-2246-6-4-2246xy (3, 4)
  • tangent: y = −¾x + 25/4
A circle and its tangent line at (3, 4)

Solving for yy works here but gets ugly fast, and for curves such as x3+y3=6xyx^3 + y^3 = 6xy it is hopeless. Implicit differentiation finds the slope without ever solving for yy.

The method

  1. Differentiate both sides of the equation with respect to xx.
  2. Treat yy as a function of xx: every term with yy gets a factor of dydx\tfrac{dy}{dx} from the chain rule.
  3. Collect the dydx\tfrac{dy}{dx} terms on one side and solve.

For the circle:

ddx(x2+y2)=ddx 25⟹2x+2ydydx=0⟹dydx=−xy\frac{d}{dx}\left(x^2 + y^2\right) = \frac{d}{dx}\,25 \quad\Longrightarrow\quad 2x + 2y\frac{dy}{dx} = 0 \quad\Longrightarrow\quad \frac{dy}{dx} = -\frac{x}{y}

Why every y term gets a dy/dx

yy stands for a function of xx, even if we never write its formula. So y2y^2 is really (y(x))2\big(y(x)\big)^2 — a composite — and the chain rule gives

ddx y2=2y⋅dydx\frac{d}{dx}\,y^2 = 2y \cdot \frac{dy}{dx}

Compare ddx x2=2x⋅dxdx=2x\tfrac{d}{dx}\,x^2 = 2x \cdot \tfrac{dx}{dx} = 2x: the factor is there too, but it equals 11. Implicit differentiation is the chain rule applied to a function whose formula is unknown. The factor dydx\tfrac{dy}{dx} is the inner derivative that the unknown function contributes.

Second derivatives

Differentiate dydx\tfrac{dy}{dx} again, remembering that yy inside it is still a function of xx. For the circle, the quotient rule gives

d2ydx2=−y−xdydxy2=−y+x2yy2=−x2+y2y3=−25y3\frac{d^2y}{dx^2} = -\frac{y - x\frac{dy}{dx}}{y^2} = -\frac{y + \frac{x^2}{y}}{y^2} = -\frac{x^2 + y^2}{y^3} = -\frac{25}{y^3}

The last step uses the original equation, x2+y2=25x^2 + y^2 = 25. On the top half (y>0y > 0) the second derivative is negative, so the arc bends downward.

Worked examples

Common mistakes

Practice problems

  1. Find dydx\tfrac{dy}{dx} for x2+4y2=16x^2 + 4y^2 = 16.

    Answer

    dydx=−x4y\tfrac{dy}{dx} = -\tfrac{x}{4y}

    Full solution

    2x+8ydydx=02x + 8y\tfrac{dy}{dx} = 0, so dydx=−2x8y=−x4y\tfrac{dy}{dx} = -\tfrac{2x}{8y} = -\tfrac{x}{4y}.

  2. Find dydx\tfrac{dy}{dx} for xy=12xy = 12.

    Answer

    dydx=−yx\tfrac{dy}{dx} = -\tfrac{y}{x}

    Full solution

    Product rule: y+xdydx=0y + x\tfrac{dy}{dx} = 0, so dydx=−yx\tfrac{dy}{dx} = -\tfrac{y}{x}.

  3. Find the tangent line to x2+y2=169x^2 + y^2 = 169 at (5,−12)(5, -12).

    Answer

    y=512x−16912y = \tfrac{5}{12}x - \tfrac{169}{12}

    Full solution

    dydx=−xy=−5−12=512\tfrac{dy}{dx} = -\tfrac{x}{y} = -\tfrac{5}{-12} = \tfrac{5}{12}. Then y+12=512(x−5)y + 12 = \tfrac{5}{12}(x - 5), so y=512x−2512−12=512x−16912y = \tfrac{5}{12}x - \tfrac{25}{12} - 12 = \tfrac{5}{12}x - \tfrac{169}{12}.

  4. Find dydx\tfrac{dy}{dx} for y3+y=x2y^3 + y = x^2.

    Answer

    dydx=2x3y2+1\tfrac{dy}{dx} = \tfrac{2x}{3y^2 + 1}

    Full solution

    3y2dydx+dydx=2x3y^2\tfrac{dy}{dx} + \tfrac{dy}{dx} = 2x, so (3y2+1)dydx=2x(3y^2 + 1)\tfrac{dy}{dx} = 2x.

  5. Find dydx\tfrac{dy}{dx} for x2y+y2=7x^2 y + y^2 = 7.

    Answer

    dydx=−2xyx2+2y\tfrac{dy}{dx} = -\tfrac{2xy}{x^2 + 2y}

    Full solution

    Product rule on x2yx^2 y: 2xy+x2dydx+2ydydx=02xy + x^2\tfrac{dy}{dx} + 2y\tfrac{dy}{dx} = 0. So (x2+2y)dydx=−2xy(x^2 + 2y)\tfrac{dy}{dx} = -2xy.

  6. Find dydx\tfrac{dy}{dx} for ey=x+ye^y = x + y.

    Answer

    dydx=1ey−1\tfrac{dy}{dx} = \tfrac{1}{e^y - 1}

    Full solution

    eydydx=1+dydxe^y\tfrac{dy}{dx} = 1 + \tfrac{dy}{dx}, so (ey−1)dydx=1(e^y - 1)\tfrac{dy}{dx} = 1.

  7. At which points of x2+y2=25x^2 + y^2 = 25 is the tangent line horizontal? Vertical?

    Answer

    Horizontal at (0,±5)(0, \pm 5); vertical at (±5,0)(\pm 5, 0).

    Full solution

    dydx=−xy\tfrac{dy}{dx} = -\tfrac{x}{y} is 00 when x=0x = 0 (with y=±5y = \pm 5), and undefined when y=0y = 0 (with x=±5x = \pm 5), where the tangent is vertical.

  8. Find d2ydx2\tfrac{d^2y}{dx^2} for xy=1xy = 1, in terms of xx and yy.

    Answer

    2yx2\tfrac{2y}{x^2}

    Full solution

    From problem 2’s method, dydx=−yx\tfrac{dy}{dx} = -\tfrac{y}{x}. Quotient rule: d2ydx2=−xdydx−yx2=−−y−yx2=2yx2\tfrac{d^2y}{dx^2} = -\tfrac{x\tfrac{dy}{dx} - y}{x^2} = -\tfrac{-y - y}{x^2} = \tfrac{2y}{x^2}.

  9. Find the slope of x3+y3=6xyx^3 + y^3 = 6xy at (43,83)\left(\tfrac{4}{3}, \tfrac{8}{3}\right), a point on the curve.

    Answer

    45\tfrac{4}{5}

    Full solution

    The point is on the curve: x3+y3=6427+51227=643x^3 + y^3 = \tfrac{64}{27} + \tfrac{512}{27} = \tfrac{64}{3} and 6xy=6⋅329=6436xy = 6 \cdot \tfrac{32}{9} = \tfrac{64}{3}.

    Use dydx=2y−x2y2−2x\tfrac{dy}{dx} = \tfrac{2y - x^2}{y^2 - 2x} from Example 2. The top is 489−169=329\tfrac{48}{9} - \tfrac{16}{9} = \tfrac{32}{9} and the bottom is 649−249=409\tfrac{64}{9} - \tfrac{24}{9} = \tfrac{40}{9}.

    The slope is 3240=45\tfrac{32}{40} = \tfrac{4}{5}.

  10. A student differentiates x2+y2=25x^2 + y^2 = 25 to get 2x+2y=02x + 2y = 0. What went wrong?

    Hint

    yy is a function of xx.

    Answer

    The dydx\tfrac{dy}{dx} from the chain rule is missing: 2x+2ydydx=02x + 2y\tfrac{dy}{dx} = 0.

    Full solution

    ddx y2=2ydydx\tfrac{d}{dx}\,y^2 = 2y\tfrac{dy}{dx}, because yy depends on xx.

    The student’s equation, 2x+2y=02x + 2y = 0, is a line, not a statement about slopes.

Frequently asked questions

What is implicit differentiation?

Differentiating both sides of an equation in x and y with respect to x, treating y as a function of x, then solving for dy/dx.

Why does the derivative of y² have a dy/dx in it?

Because y is a function of x, y² is a composite, and the chain rule gives 2y · dy/dx.

How do I differentiate xy implicitly?

With the product rule: d/dx (xy) = 1 · y + x · dy/dx.

Why does the answer contain both x and y?

An implicit curve can pass through several points with the same x — a circle does — and each has its own slope, so the slope needs y to say which point is meant.

When should I use implicit differentiation?

When solving for y is hard or impossible, or gives more than one branch, as with a circle or x³ + y³ = 6xy.

What to learn next