Implicit Differentiation

Differentiate both sides and attach dy/dx.

A curve that is not y = f(x)

x² + y² = 25 is the circle of radius 5 centered at the origin. Solving for y gives two answers, y = √(25 − x²) for the top half and y = −√(25 − x²) for the bottom half. Between x = −5 and x = 5 each x has two points above it, so no single function of x gives the whole circle.

Implicit differentiation finds dy/dx from the equation as it stands, without choosing a half. The equation defines y implicitly, as a function of x near each point, even where no formula for it is written down.

Differentiating a term in y

Differentiate every term of x² + y² = 25 with respect to x, treating y as a function of x. x² gives 2x, and the constant 25 gives 0.

y² is a function inside a function: the inner function is y and the outer function is the square. So the chain rule gives 2y × dy/dx. The power rule on y gives 2y, and then the inner derivative, dy/dx, multiplies it. Every term in y gains a factor dy/dx in the same way: y³ gives 3y² dy/dx.

Solving for dy/dx

So 2x + 2y dy/dx = 0. Take 2x from both sides: 2y dy/dx = −2x. Divide both sides by 2y: dy/dx = −x/y, wherever y ≠ 0.

At (3, 4) the gradient is −3/4, and at (3, −4) it is 3/4. At (5, 0), y = 0 and −x/y has no value: the tangent there is vertical.

Check on the top half, y = √(25 − x²). At x = 3.001, y = 3.9992498, so the chord from (3, 4) has gradient −0.0007502/0.001 = −0.7502, close to −3/4. The chain rule on √(25 − x²) gives −x/√(25 − x²), which is −x/y again.

The geometry agrees. The radius to (3, 4) has gradient 4/3, and (4/3) × (−3/4) = −1, so the tangent is perpendicular to the radius, as a tangent to a circle must be.

xy(3, 4)

The circle x² + y² = 25. The gold line is the tangent at (3, 4), with gradient −x/y = −3/4; the dashed line through the origin carries the radius, with gradient 4/3. They meet at a right angle.

(3.8, 3.2)x = 3.83y = 3.21dy/dx = −1.19−5−555

x and y share a sign, so −x/y < 0: the tangent falls, perpendicular to the radius of gradient y/x

Find the points where the tangent has gradient +1

A point held on the circle x² + y² = 25, with the tangent there drawn at gradient −x/y. Where x and y have the same sign the tangent falls, where they differ it rises, at the top and bottom it is flat, and at the sides it is vertical.

A term with both x and y

In xy = 12, the term xy is a product of x and y, so it needs the product rule: 1 × y + x × dy/dx. So y + x dy/dx = 0, and dy/dx = −y/x. At (3, 4), which is on the curve since 3 × 4 = 12, the gradient is −4/3.

Here the equation can also be solved: y = 12/x, so dy/dx = −12/x², which is −12/9 = −4/3 at x = 3.

A curve that cannot be rearranged

y⁵ + y = x has exactly one y for each x, but no formula gives it. Differentiate anyway: 5y⁴ dy/dx + dy/dx = 1. Factor out dy/dx: (5y⁴ + 1) dy/dx = 1, so dy/dx = 1/(5y⁴ + 1). This is never 0 and always positive, so the curve rises everywhere.

At (2, 1), which is on the curve since 1 + 1 = 2, the gradient is 1/6 = 0.1667. Check: solving y⁵ + y = 2.001 numerically gives y = 1.00016662, so the chord from (2, 1) has gradient 0.16662. At the origin the gradient is 1/(0 + 1) = 1.

xy

The gold curve y⁵ + y = x, drawn by solving for y at each x. At (2, 1) its tangent, the gold line, has gradient 1/(5y⁴ + 1) = 1/6; at the origin the curve leaves at gradient 1.

The method

Differentiate every term with respect to x. A term in y alone gains a factor dy/dx, by the chain rule. A term with both x and y needs the product rule. A constant gives 0. Then collect the terms in dy/dx on one side, factor out dy/dx, and divide.

For x² + xy + y² = 7, the terms give 2x, then y + x dy/dx, then 2y dy/dx, and 0. So (x + 2y) dy/dx = −(2x + y), and dy/dx = −(2x + y)/(x + 2y). At (1, 2), which is on the curve since 1 + 2 + 4 = 7, the gradient is −4/5 = −0.8. Solving the equation numerically for y near x = 1 gives the same slope.

The usual mistakes

Differentiating y² as 2y. That differentiates with respect to y; with respect to x, the chain rule adds the factor dy/dx.

Differentiating a product such as 9xy as 9 dy/dx. The product rule gives 9y + 9x dy/dx.

Dropping a coefficient: for 3x² + y² = 4, the 3x² gives 6x, so dy/dx = −3x/y, not −x/y.

Turning the answer upside down. From 2y dy/dx = −2x, dy/dx = −x/y, with y in the denominator.

A leaf-shaped panel

In the application below, the edge of a panel follows x³ + y³ = 9xy, which has a term in y alone and a term with both letters, so it uses the chain rule and the product rule together.

Worked example: A Leaf-Shaped Panel Whose Edge Obeys a Relation That Cannot Be Solved for y

Question A metalworker cuts a leaf-shaped panel whose edge follows x3 + y3 = 9xy, with x and y in centimeters, and the cutting head must be set along the tangent to that edge. (a) Find dydx at the point (2, 4). (b) Find it at the point (4, 2), and say what the two answers show about the shape.

  1. 1.Check first that (2, 4) lies on the edge: 23 + 43 = 8 + 64 = 72, and 9 × 2 × 4 = 72.

    012345012345x, cmy, cm(2, 4)23+ 43= 72 and 9 × 2 × 4 = 72(2, 4) is on the edge
    012345012345x, cmy, cm(2, 4)23+ 43= 72 and 9 × 2 × 4 = 72(2, 4) is on the edge
    The point (2, 4) lies on the edge: 23 + 43 = 72 and 9 × 2 × 4 = 72.
  2. 2.Differentiate both sides with respect to x. The chain rule gives ddx(y3) = 3y2dydx, and the product rule gives ddx(9xy) = 9y + 9xdydx.

    012345012345x, cmy, cm(2, 4)d(y3)/dx = 3y2dy/dxd(9xy)/dx = 9y + 9x dy/dx
    012345012345x, cmy, cm(2, 4)d(y3)/dx = 3y2dy/dxd(9xy)/dx = 9y + 9x dy/dx
    Differentiating y3 needs the chain rule and 9xy the product rule, because y is a function of x.
  3. 3.So 3x2 + 3y2dydx = 9y + 9xdydx. Collect the terms in dydx on one side: (3y2 − 9x)dydx = 9y − 3x2.

    012345012345x, cmy, cm(2, 4)3x2+ 3y2dy/dx = 9y + 9x dy/dx(3y2− 9x) dy/dx = 9y − 3x2
    012345012345x, cmy, cm(2, 4)3x2+ 3y2dy/dx = 9y + 9x dy/dx(3y2− 9x) dy/dx = 9y − 3x2
    So 3x2 + 3y2dydx = 9y + 9xdydx, and the dydx terms collect on one side.
  4. 4.Divide both sides by 3 and then by (y2 − 3x): dydx = 3y − x2y2 − 3x.

    012345012345x, cmy, cm(2, 4)dy/dx = (3y − x2)/(y2− 3x)
    012345012345x, cmy, cm(2, 4)dy/dx = (3y − x2)/(y2− 3x)
    Dividing gives dydx = 3y − x2y2 − 3x, a gradient for any point on the edge.
  5. 5.(a) At (2, 4): 12 − 416 − 6 = 810 = 0.8, so the head is set at a gradient of 0.8.

    012345012345x, cmy, cmrun 1rise 0.8(2, 4)(2, 4): (12 − 4)/(16 − 6) = 0.8
    012345012345x, cmy, cmrun 1rise 0.8(2, 4)(2, 4): (12 − 4)/(16 − 6) = 0.8
    (a) At (2, 4) the gradient is 810 = 0.8: the tangent rises 0.8 cm for each centimeter across.
  6. 6.(b) At (4, 2): 6 − 164 − 12 = −10−8 = 1.25. Swapping x and y leaves the relation unchanged, so the edge is its own mirror image in the line y = x, and 0.8 × 1.25 = 1.

    012345012345x, cmy, cmy = x(4, 2)(2, 4)(4, 2): (6 − 16)/(4 − 12) = 1.250.8 × 1.25 = 1: mirrored in y = x
    012345012345x, cmy, cmy = x(4, 2)(2, 4)(4, 2): (6 − 16)/(4 − 12) = 1.250.8 × 1.25 = 1: mirrored in y = x
    (b) At (4, 2) it is −10−8 = 1.25. The edge is its own mirror image in y = x, and 0.8 × 1.25 = 1.

Answer: (a) dydx = 0.8 at (2, 4); (b) dydx = 1.25 at (4, 2), and the two gradients multiply to 1 because the edge is symmetrical about y = x

Common mistakes

  • Differentiating y3 as 3y2 and stopping there. Since y is itself a function of x, the chain rule attaches dydx, and without it the equation cannot be solved for the gradient.
  • Differentiating 9xy as 9dydx. It is a product of 9x and y, so the product rule gives 9y + 9xdydx.

More rules of differentiation problems, worked step by step →

Practice Implicit Differentiation in the app