Skip to content

Unit 3: Differentiation: Composite, Implicit, and Inverse Functions

Implicit Differentiation

Find dy/dx for a curve given by an equation in x and y, without solving for y, and use it for slopes, tangent lines, and horizontal or vertical tangents.

Topic 3.2 · 9 min read

The curve x2y+y3=10x^2y + y^3 = 10 passes through the point (1,2)(1, 2), since 1⋅2+23=101\cdot 2 + 2^3 = 10. To find its slope there the way you have so far, you would first solve for yy, and that means solving a cubic equation in yy for every xx. Implicit differentiation skips that step. You differentiate the equation as it stands, treating yy as an unknown function of xx, and the chain rule from topic 3.1 tells you what to do with every yy you meet.

One equation, several functions

A function is defined explicitly when yy is written alone on one side: y=100−x2y = \sqrt{100 - x^2}. It is defined implicitly when an equation ties xx and yy together without isolating yy: x2+y2=100x^2 + y^2 = 100.

An implicit equation can describe a curve that is not the graph of any single function. The circle x2+y2=100x^2 + y^2 = 100 fails the vertical line test, since the line x=6x = 6 meets it at (6,8)(6, 8) and (6,−8)(6, -8). But near any one point other than (10,0)(10, 0) and (−10,0)(-10, 0), where the tangent is vertical, a small piece of the circle is the graph of a function. The top half is y=100−x2y = \sqrt{100 - x^2} and the bottom half is y=−100−x2y = -\sqrt{100 - x^2}, and both satisfy the equation. When you differentiate implicitly, you are differentiating whichever of these functions passes through the point you care about, and the coordinates you plug in pick it out for you.

That is why implicit derivatives usually contain both xx and yy. At x=6x = 6 the circle has two different slopes, one at (6,8)(6, 8) and one at (6,−8)(6, -8), so a formula that depended on xx alone could not give both.

Why every yy term picks up dydx\frac{dy}{dx}

Since yy stands for a function of xx, any expression in yy is a composition: the inside is y(x)y(x) and the outside is whatever is done to it. So y4y^4 is [y(x)]4[y(x)]^4, and by the chain rule

ddx[y4]=4y3⋅dydx.\frac{d}{dx}\left[y^4\right] = 4y^3\cdot\frac{dy}{dx}.

This is the row [g(x)]n[g(x)]^n from topic 3.1's table, with g=yg = y. Compare ddx[x4]=4x3\frac{d}{dx}\left[x^4\right] = 4x^3: there the inside is xx itself, whose derivative is 1, so no extra factor appears. The factor dydx\frac{dy}{dx} is the inside derivative, and you cannot write it as a number or a formula yet because you don't know y(x)y(x). You carry it as an unknown and solve for it at the end.

ExpressionDerivative with respect to xx
y4y^44y3 dydx4y^3\,\dfrac{dy}{dx}
sin⁡y\sin ycos⁡y dydx\cos y\,\dfrac{dy}{dx}
eye^{y}ey dydxe^{y}\,\dfrac{dy}{dx}
ln⁡y\ln y1y dydx\dfrac{1}{y}\,\dfrac{dy}{dx}
xyxyy+x dydxy + x\,\dfrac{dy}{dx}
x2y3x^2y^32xy3+3x2y2 dydx2xy^3 + 3x^2y^2\,\dfrac{dy}{dx}
exye^{xy}exy(y+x dydx)e^{xy}\left(y + x\,\dfrac{dy}{dx}\right)

The last three rows need more than the chain rule. A term such as xyxy is a product of two functions of xx, so it needs the product rule, and the factor yy inside it still brings its own dydx\frac{dy}{dx}. In exye^{xy}, the inside is the product xyxy, so the inside derivative is the whole product-rule result.

Try it on the circle. Differentiating both sides of x2+y2=100x^2 + y^2 = 100 gives

2x+2y dydx=0,sodydx=−xy.2x + 2y\,\frac{dy}{dx} = 0, \qquad\text{so}\qquad \frac{dy}{dx} = -\frac{x}{y}.

At (6,8)(6, 8) the slope is −68=−34-\frac{6}{8} = -\frac{3}{4}, and at (6,−8)(6, -8) it is 34\frac{3}{4}, one formula giving both. You can confirm the first one explicitly: on the top half, y=(100−x2)1/2y = (100 - x^2)^{1/2}, so y′=−x100−x2y' = \frac{-x}{\sqrt{100 - x^2}}, which at x=6x = 6 is −68-\frac{6}{8}. There is also a geometric check. The radius to (6,8)(6, 8) has slope 86\frac{8}{6}, and a tangent to a circle is perpendicular to the radius, so its slope is the negative reciprocal, −68-\frac{6}{8}.

Solving for dydx\frac{dy}{dx}

After you differentiate, dydx\frac{dy}{dx} appears in one or more terms, and the equation is linear in it: it is never squared or inside a function. So you can always isolate it with algebra.

Back to the opening curve, x2y+y3=10x^2y + y^3 = 10. The first term is a product, so

2xy+x2dydx+3y2dydx=0.2xy + x^2\frac{dy}{dx} + 3y^2\frac{dy}{dx} = 0.

Collecting and factoring,

(x2+3y2)dydx=−2xy,dydx=−2xyx2+3y2.\left(x^2 + 3y^2\right)\frac{dy}{dx} = -2xy, \qquad \frac{dy}{dx} = \frac{-2xy}{x^2 + 3y^2}.

At (1,2)(1, 2), the slope is −41+12=−413\frac{-4}{1 + 12} = -\frac{4}{13}.

When you only need the slope at one point, you can substitute the coordinates right after step 1 and then solve. At (1,2)(1, 2) the differentiated equation becomes 4+dydx+12dydx=04 + \frac{dy}{dx} + 12\frac{dy}{dx} = 0, so dydx=−413\frac{dy}{dx} = -\frac{4}{13} with almost no algebra. Substitute only after differentiating; the last trap below shows what goes wrong otherwise.

Reading horizontal and vertical tangents from the formula

Write the implicit derivative as a fraction, dydx=ND\frac{dy}{dx} = \frac{N}{D}, where NN and DD are expressions in xx and yy.

  • The tangent is horizontal at a point of the curve where N=0N = 0 and D≠0D \neq 0, since the slope is 0 there.
  • The tangent is vertical at a point of the curve where D=0D = 0 and N≠0N \neq 0. The slope is undefined there, and the curve, viewed with xx as a function of yy, has dxdy=DN=0\frac{dx}{dy} = \frac{D}{N} = 0.
  • Where NN and DD are both 0, the formula gives 00\frac{0}{0} and decides nothing. The curve might cross itself there or have a cusp, and you would need another method.

Setting N=0N = 0 gives one equation in two unknowns, so it describes many points, almost all of them off the curve. You find the actual points by solving it together with the original equation. On the circle, N=−xN = -x, so a horizontal tangent needs x=0x = 0; the circle then gives y2=100y^2 = 100, so the horizontal tangents are at (0,10)(0, 10) and (0,−10)(0, -10), where D=y≠0D = y \neq 0.

Differentiating an implicit equation a second time gives d2ydx2\frac{d^2y}{dx^2} as a relation in xx, yy and dydx\frac{dy}{dx}. Topic 3.6 shows the computation, and topic 5.12 uses it to find and classify critical points of implicit curves.

Worked examples

Worked exampleExample 1: roots on both sides

Find dydx\frac{dy}{dx} for the curve x+y=5\sqrt{x} + \sqrt{y} = 5, and find the slope of the curve at (4,9)(4, 9).

Show solution

First confirm the point is on the curve: 4+9=2+3=5\sqrt{4} + \sqrt{9} = 2 + 3 = 5.

Write the roots as powers, x1/2+y1/2=5x^{1/2} + y^{1/2} = 5, and differentiate both sides. The yy term is a composition with inside yy, so it gets the factor dydx\frac{dy}{dx}; the constant 5 has derivative 0:

12x+12ydydx=0.\frac{1}{2\sqrt{x}} + \frac{1}{2\sqrt{y}}\frac{dy}{dx} = 0.

Only one term contains dydx\frac{dy}{dx}, so isolate it directly:

dydx=−12x⋅2y=−yx.\frac{dy}{dx} = -\frac{1}{2\sqrt{x}}\cdot 2\sqrt{y} = -\frac{\sqrt{y}}{\sqrt{x}}.

At (4,9)(4, 9), the slope is −32-\frac{3}{2}. A negative slope fits the curve: as xx grows, x\sqrt{x} grows, so y\sqrt{y} must shrink to keep the sum at 5.

Worked exampleExample 2: an exponential with a product inside

Write an equation for the line tangent to the curve ey+xy=ee^{y} + xy = e at the point (0,1)(0, 1).

Show solution

Check the point: e1+0⋅1=ee^1 + 0\cdot 1 = e.

Differentiate both sides. The derivative of eye^y is eydydxe^y\frac{dy}{dx} by the chain rule, xyxy needs the product rule, and ee is a constant:

eydydx+y+xdydx=0.e^{y}\frac{dy}{dx} + y + x\frac{dy}{dx} = 0.

Collect the dydx\frac{dy}{dx} terms and solve:

(ey+x)dydx=−y,dydx=−yey+x.\left(e^{y} + x\right)\frac{dy}{dx} = -y, \qquad \frac{dy}{dx} = \frac{-y}{e^{y} + x}.

At (0,1)(0, 1), the slope is −1e+0=−1e\frac{-1}{e + 0} = -\frac{1}{e}. The tangent line through (0,1)(0, 1) is

y=1−1ex.y = 1 - \frac{1}{e}x.

Solving for yy first was never an option here: ey+xy=ee^y + xy = e cannot be solved for yy with algebra and the functions in this course.

Worked exampleExample 3: an exam-style curve question (no calculator)

Consider the curve given by x2−2xy+3y2=12x^2 - 2xy + 3y^2 = 12.

(a) Show that dydx=y−x3y−x\dfrac{dy}{dx} = \dfrac{y - x}{3y - x}.

(b) Find all points on the curve at which the tangent line is horizontal.

(c) Find all points on the curve at which the tangent line is vertical.

(d) There are two points on the curve with xx-coordinate 4. Find them, and find the slope of the curve at each.

Show solution

(a) Differentiate both sides with respect to xx. The middle term is a product, so it needs the product rule:

2x−2(y+xdydx)+6ydydx=0.2x - 2\left(y + x\frac{dy}{dx}\right) + 6y\frac{dy}{dx} = 0.

Collect the dydx\frac{dy}{dx} terms on the left and the rest on the right:

(6y−2x)dydx=2y−2x,dydx=2(y−x)2(3y−x)=y−x3y−x.(6y - 2x)\frac{dy}{dx} = 2y - 2x, \qquad \frac{dy}{dx} = \frac{2(y - x)}{2(3y - x)} = \frac{y - x}{3y - x}.

A "show that" part is earned by the differentiation line and the algebra that reaches the given expression, so both belong on the page.

(b) A horizontal tangent needs the numerator to be 0, so y=xy = x. Points with y=xy = x must also lie on the curve, so substitute into the original equation:

x2−2x2+3x2=2x2=12,x=±6.x^2 - 2x^2 + 3x^2 = 2x^2 = 12, \qquad x = \pm\sqrt{6}.

The points are (6,6)\left(\sqrt{6}, \sqrt{6}\right) and (−6,−6)\left(-\sqrt{6}, -\sqrt{6}\right). At each, the denominator is 3y−x=±26≠03y - x = \pm 2\sqrt{6} \neq 0, so the slope really is 0.

(c) A vertical tangent needs the denominator to be 0, so x=3yx = 3y. Substitute into the curve:

9y2−6y2+3y2=6y2=12,y=±2.9y^2 - 6y^2 + 3y^2 = 6y^2 = 12, \qquad y = \pm\sqrt{2}.

The points are (32,2)\left(3\sqrt{2}, \sqrt{2}\right) and (−32,−2)\left(-3\sqrt{2}, -\sqrt{2}\right). At each, the numerator is y−x=∓22≠0y - x = \mp 2\sqrt{2} \neq 0, so these are vertical tangents, not 00\frac{0}{0} points.

(d) Put x=4x = 4 into the curve: 16−8y+3y2=1216 - 8y + 3y^2 = 12, so 3y2−8y+4=03y^2 - 8y + 4 = 0, which factors as (3y−2)(y−2)=0(3y - 2)(y - 2) = 0. The points are (4,2)(4, 2) and (4,23)\left(4, \frac{2}{3}\right).

dydx∣(4, 2)=2−46−4=−1,dydx∣(4, 2/3)=23−42−4=53.\left.\frac{dy}{dx}\right|_{(4,\,2)} = \frac{2 - 4}{6 - 4} = -1, \qquad \left.\frac{dy}{dx}\right|_{(4,\,2/3)} = \frac{\frac{2}{3} - 4}{2 - 4} = \frac{5}{3}.

One xx-value, two slopes: the curve is the tilted ellipse below, and the line x=4x = 4 crosses it twice, once on the upper arc and once on the lower.

The curve x squared minus 2xy plus 3y squared equals 12, a tilted ellipse centered at the origin. Dashed horizontal tangents touch it at (root 6, root 6), about (2.45, 2.45), and at (negative root 6, negative root 6). Dashed vertical tangents touch it at (3 root 2, root 2), about (4.24, 1.41), and at (negative 3 root 2, negative root 2). The points (4, 2) and (4, 2/3) are marked with short tangent segments of slope negative 1 and 5/3.

Where students lose points

On the exam

A free-response question on an implicit curve may open with "show that dydx=…\frac{dy}{dx} = \ldots". The given expression lets you do the later parts even if your own differentiation goes wrong, so use it. The later parts can ask for a tangent line at a point, points with horizontal or vertical tangents, or the second derivative (topics 3.6 and 5.12). An answer may be left in terms of xx and yy unless a point is given. A multiple-choice question can ask for the slope at a given point, where substituting the point right after differentiating is the fastest route, or for the points where the tangent is horizontal or vertical, which means solving the slope condition together with the curve's equation.

Check yourself

  1. Question 1

    What is the slope of the curve xy2=18xy^2 = 18 at the point (2,3)(2, 3)?

    1. A

      −34-\dfrac{3}{4}

    2. B

      −32-\dfrac{3}{2}

    3. C

      −43-\dfrac{4}{3}

    4. D

      34\dfrac{3}{4}

    Show answer

    A

    The product rule gives y2+2xy dydx=0y^2 + 2xy\,\dfrac{dy}{dx} = 0, so dydx=−y2x=−34\dfrac{dy}{dx} = -\dfrac{y}{2x} = -\dfrac{3}{4}. Choice B comes from dropping the factor xx when differentiating xy2xy^2, which gives y2+2y dydx=0y^2 + 2y\,\dfrac{dy}{dx} = 0; choice C is the reciprocal, dxdy\dfrac{dx}{dy}.

  2. Question 2

    The curve y3+y=xy^3 + y = x passes through (10,2)(10, 2). Find dydx\dfrac{dy}{dx} there, and explain why dydx\dfrac{dy}{dx} is positive at every point of the curve.

    Show answer

    dydx=13y2+1\dfrac{dy}{dx} = \dfrac{1}{3y^2 + 1}, which is 113\dfrac{1}{13} at (10,2)(10, 2) and positive everywhere because 3y2+1≥13y^2 + 1 \geq 1.

    Differentiating gives 3y2dydx+dydx=13y^2\dfrac{dy}{dx} + \dfrac{dy}{dx} = 1, so (3y2+1)dydx=1(3y^2 + 1)\dfrac{dy}{dx} = 1. The denominator 3y2+13y^2 + 1 is at least 1 for every yy, so the slope is always positive, and at y=2y = 2 it is 113\dfrac{1}{13}. You learn the curve is always rising without ever solving the cubic for yy.

  3. Question 3

    At which points does the curve x2+y2−4x+2y=20x^2 + y^2 - 4x + 2y = 20 have a vertical tangent line?

    1. A

      (2,4)(2, 4) and (2,−6)(2, -6)

    2. B

      (7,−1)(7, -1) and (−3,−1)(-3, -1)

    3. C

      (2,−1)(2, -1) only

    4. D

      (5,−1)(5, -1) and (−5,−1)(-5, -1)

    Show answer

    B

    Implicit differentiation gives dydx=2−xy+1\dfrac{dy}{dx} = \dfrac{2 - x}{y + 1}. A vertical tangent needs y+1=0y + 1 = 0 with 2−x≠02 - x \neq 0; putting y=−1y = -1 into the curve gives x2−4x−21=0x^2 - 4x - 21 = 0, so x=7x = 7 or x=−3x = -3. Choice A is where the numerator is 0, the horizontal tangents. Choice C, the center (2,−1)(2, -1), makes both parts 0 but is not on the curve. Choice D has the right yy-value but measures 5 units left and right of x=0x = 0; completing the square gives (x−2)2+(y+1)2=25(x - 2)^2 + (y + 1)^2 = 25, a circle with center (2,−1)(2, -1) and radius 5, so the vertical tangents are 5 units left and right of x=2x = 2.

  4. Question 4

    Find the slope of the curve ex−y=x2ye^{x - y} = x^2y at the point (1,1)(1, 1).

    Show answer

    dydx=−12\dfrac{dy}{dx} = -\dfrac{1}{2}

    Differentiating gives ex−y(1−dydx)=2xy+x2dydxe^{x-y}\left(1 - \dfrac{dy}{dx}\right) = 2xy + x^2\dfrac{dy}{dx}. Substituting (1,1)(1, 1) right away gives 1−dydx=2+dydx1 - \dfrac{dy}{dx} = 2 + \dfrac{dy}{dx}, so dydx=−12\dfrac{dy}{dx} = -\dfrac{1}{2}. The point is on the curve because e0=1=12⋅1e^0 = 1 = 1^2\cdot 1.

Go deeper