🌌 Calculus Kingdom · Calculus

Implicit Differentiation

Differentiate a relation that is not solved for y: treat y as a function of x, apply the chain rule to every y, and solve for dy/dx — then find the slope and the tangent at a point on a circle, an ellipse or a hyperbola.

In short

  • y is a function of x even when the equation does not say so, so differentiating any y with respect to x leaves a factor of y' behind: d/dx (y2) = 2y y', d/dx (sin y) = cos(y) y'.
  • A term containing both letters, like xy or x2 y, needs the product rule as well as the chain rule, and both halves survive: d/dx (xy) = y + x y'.
  • After differentiating, collect the y-prime terms on one side, factor y-prime out and divide. The answer is normally an expression in x and y, and the y in it is what distinguishes the two points of the curve above one x-value.
  • A horizontal tangent makes the numerator of dy/dx zero and a vertical tangent makes the denominator zero; substitute that condition back into the original equation to get the point.

A curve that refuses to be a function

Everything you have differentiated so far arrived already solved for y: y = x2 - 3x, y = sin(x), y = ex. Archmage Newt calls that an explicit equation, because it says outright what y is.

The Spire is built on curves that will not say. A circle is the plainest example:

x2 + y2 = 25

There is no way to write that as a single y = something. Solve it and the circle splits in two:

y = sqrt(25 - x2) (the top half) y = -sqrt(25 - x2) (the bottom half)

Two functions, two formulas, two derivatives, and a fight with the chain rule and a square root in each of them. An equation like this, one that ties x and y together without solving for either, is called an implicit relation.

You do not have to solve it. Here is the idea the whole craft rests on: wherever you are standing on the curve, y is some function of x, even though nobody has written down which one. Near the point (3, 4) the circle really is the graph of a function; near (3, -4) it is the graph of a different one. Either way there is a y that depends on x, so there is a dy/dx, and the chain rule can reach it.

So differentiate both sides of the equation exactly as it stands, treat every y as "some function of x", and then solve the result for dy/dx. That is implicit differentiation, start to finish.

Why every y grows a y'

Differentiating x-terms is nothing new: d/dx of x2 is 2x. The whole difference is what happens to a y.

Because y is a function of x, differentiating y2 with respect to x is a chain rule: the outside is (something)^2, the inside is y, and the derivative of the inside is dy/dx. Writing y' as a short name for dy/dx:

d/dx (y2) = 2y y' d/dx (y3) = 3y2 y' d/dx (sin y) = cos(y) y' d/dx (ey) = ey y' d/dx (y) = y'

The pattern never changes. Differentiate as usual, then multiply by y'. A term made only of x picks up no y'; a term with a y in it always does.

A term with both letters needs the product rule as well, and this is where most of the marks are lost:

d/dx (xy) = (1)(y) + (x)(y') = y + x y' d/dx (x2 y) = 2xy + x2 y' d/dx (x2 y3) = 2x y3 + 3x2 y2 y'

Read the middle one slowly. Half of it, 2xy, came from differentiating the x2 and leaving y alone. The other half, x2 y', came from differentiating the y and leaving x2 alone. Both halves are always there.

The method, in four moves.

  • Differentiate every term on both sides with respect to x, attaching y' to each term that came from a y.
  • Move every term containing y' to one side and everything else to the other.
  • Factor y' out of that side.
  • Divide, and you have dy/dx.

For the circle:

x2 + y2 = 25 2x + 2y y' = 0 2y y' = -2x y' = -x/y

Notice the shape of the answer. dy/dx is usually an expression in x and y, not in x alone — and that is not a failure to simplify. The circle has two points above every x-value, one with a positive slope and one with a negative one, and the y in the formula is exactly what tells them apart.

Slope and tangent at a point

Once you have dy/dx, a point does the rest of the work. Substitute both coordinates.

On x2 + y2 = 25 the slope formula is y' = -x/y, so:

at (3, 4): slope = -3/4 at (3, -4): slope = 3/4 at (-4, 3): slope = 4/3

Same x, opposite y, opposite slope. The formula needed the y after all.

Check that the point is on the curve before you use it. Substituting (3, 4) into x2 + y2 gives 9 + 16 = 25, so the point is genuinely on the circle. A point that is not on the curve has no tangent there, and the arithmetic will still produce a number, which is what makes the slip hard to see.

The tangent line. A line needs a slope and a point, and you now have both. Use the point-slope form and tidy:

y = m(x - x1) + y1

At (3, 4) on the circle, m = -3/4:

y = -3/4 (x - 3) + 4 y = -3x/4 + 9/4 + 4 y = -3x/4 + 25/4

The normal line is the line through the same point at right angles to the curve — straight through the centre, for a circle. Perpendicular slopes multiply to -1, so the normal slope is the negative reciprocal of the tangent slope. At (3, 4) the tangent slope is -3/4, so the normal slope is 4/3, and the normal line is

y = 4/3 (x - 3) + 4 = 4x/3

which passes through the origin, exactly as a circle's normal must.

Flat tangents, vertical tangents, and going round again

Write dy/dx as a fraction and the two special directions are easy to spot.

  • The tangent is horizontal where dy/dx = 0, which happens where the numerator is zero (and the denominator is not).
  • The tangent is vertical where dy/dx has no value, which happens where the denominator is zero (and the numerator is not).

On x2 + y2 = 25, dy/dx = -x/y. The numerator is zero when x = 0, and the curve then gives y2 = 25, so y = 5 or y = -5: the tangent is horizontal at (0, 5) and (0, -5), the top and the bottom of the circle. The denominator is zero when y = 0, giving x = 5 or x = -5: the tangent is vertical at (5, 0) and (-5, 0), the two sides. Four points in all, which is what a circle should have.

The condition is only half the job. Always substitute the condition back into the original equation to find the other coordinate — the answer is a point, not a value of x.

On a curve with a cross term the condition is more interesting. For x2 + xy + y2 = 12,

2x + y + x y' + 2y y' = 0 y' = -(2x + y)/(x + 2y)

so the tangent is horizontal where 2x + y = 0, that is y = -2x. Substituting into the curve: x2 - 2x2 + 4x2 = 3x2 = 12, so x = 2 or x = -2, and the points are (2, -4) and (-2, 4).

The second derivative. Differentiate dy/dx again, still treating y as a function of x, and then substitute the dy/dx you already know. For the circle:

y' = -x/y y'' = -(y - x y')/y2 (quotient rule) y'' = -(y + x2/y)/y2 (using y' = -x/y) y'' = -(x2 + y2)/y3 (multiplying top and bottom by y)

Every second derivative from an implicit relation is found this way: differentiate the first derivative, then replace the y' that appears with the expression you already have. On a circle of radius 5 the answer is also -25/y3, since x2 + y2 = 25 there — but the form in x and y is the one that is true whichever circle you are on, so that is the one to write down.

Worked examples

Example 1

Find dy/dx for x2 + xy + y2 = 7, and then find the slope of the curve at the point (1, 2).

  1. Differentiate every term with respect to x. The x2 gives 2x. The xy needs the product rule: y + x y'. The y2 gives 2y y'. The 7 gives 0.
  2. So 2x + y + x y' + 2y y' = 0.
  3. Move the terms without y' across: x y' + 2y y' = -(2x + y).
  4. Factor: y'(x + 2y) = -(2x + y), so dy/dx = -(2x + y)/(x + 2y).
  5. Check the point first: 1 + 2 + 4 = 7, so (1, 2) is on the curve.
  6. Substitute: dy/dx = -(2 + 2)/(1 + 4) = -4/5.

Example 2

The point (4, 3) lies on the circle x2 + y2 = 25. Find the tangent line there, and find every point on the circle where the tangent is vertical.

  1. Differentiate both sides: 2x + 2y y' = 0, so dy/dx = -x/y.
  2. At (4, 3) the slope is -4/3.
  3. Point-slope form: y = -4/3 (x - 4) + 3.
  4. Tidy it: y = -4x/3 + 16/3 + 3 = -4x/3 + 25/3.
  5. A vertical tangent needs the denominator of -x/y to be zero, so y = 0.
  6. Put y = 0 back into x2 + y2 = 25: x2 = 25, so x = 5 or x = -5.
  7. The tangent is vertical at (5, 0) and at (-5, 0).

Example 3

Find dy/dx at the point (2, 0) on the curve x ey + y2 = 2.

  1. Differentiate x ey with the product rule: (1)(ey) + (x)(ey y') = ey + x ey y'.
  2. Differentiate y2: 2y y'. The constant 2 gives 0.
  3. So ey + x ey y' + 2y y' = 0.
  4. Substitute x = 2 and y = 0, remembering that e0 = 1: 1 + 2y' + 0 = 0.
  5. Solve: 2y' = -1, so dy/dx = -1/2.

Practice problems, with solutions

Three problems of increasing difficulty, each with the full working. In the game these are generated fresh every time; these three are fixed so this page always shows the same ones.

Problem 1

Difficulty 1 of 5

Here y is a function of x, and y' means dy/dx. Which expression is d/dx (y3)?

  1. 3y'
  2. y3 y'
  3. 3y2
  4. 3y2 y'

Answer: D. 3y2 y'

  1. Differentiate y3 with respect to x, treating y as a function of x.
  2. d/dx (y3) = 3y2 y'

Problem 2

Difficulty 3 of 5

y3 = 2x2 + 9 Assume y is a function of x. Find dy/dx, and give dy/dx in terms of x and y.

Answer: 4x/(3y2)

  1. Differentiate both sides with respect to x: 3y2 y' = 4x
  2. Collect the y' terms on one side and divide by whatever multiplies them.
  3. dy/dx = 4x/(3y2)

Problem 3

Difficulty 4 of 5

The point (-3, 3) lies on the curve x3 + 3y3 = 54. Find the slope of the curve at that point. Give an exact value.

Answer: -1/3

  1. Differentiate both sides with respect to x: 3x2 + 9y2 y' = 0
  2. dy/dx = -x2/(3y2)
  3. At (-3, 3): dy/dx = -1/3

Common mistakes

  • Differentiating y2 as 2y. Every y is a function of x, so the chain rule adds a factor of dy/dx: the derivative is 2y y', not 2y.
  • Treating xy as a single power or differentiating it as y' alone. It is a product of two functions of x, so the product rule gives y + x y' — two terms, always.
  • Attaching y' to every term, including the ones that came from x. Only the terms produced by differentiating a y carry y'; 2x stays 2x.
  • Forgetting the last division. Once the y' terms are gathered you still have y'(something) = something else; dy/dx is what you get after dividing by the bracket, not before.
  • Reading a horizontal tangent off the denominator and a vertical one off the numerator. Slope zero means the top of the fraction is zero; a vertical tangent is where the bottom is zero and the slope has no value.
  • Stopping at the condition instead of the point. "The tangent is horizontal where x = 0" is half an answer — put x = 0 back into the curve to find the y-values and give the points.

What you should be able to do

  • Differentiate y2, xy and similar terms with respect to x.
  • Find dy/dx for a relation by implicit differentiation.
  • Find the slope and the tangent line at a point on an implicit curve.
  • Find where an implicit curve has a horizontal or vertical tangent.

Where this fits in the curriculum

Common Core

  • FUN-3.D

    AP Calculus AB, Unit 3 — Calculate derivatives of implicitly defined functions.

    The Common Core has no calculus standards; this is the AP Calculus AB learning objective.

  • FUN-4.C

    AP Calculus AB, Unit 5 — Determine critical points of implicit relations.

    The Common Core has no calculus standards; this is the AP Calculus AB learning objective.

Learn these first

This leads on to