Math Core

Lesson 3.2 · Composite, Implicit and Inverse Functions

Implicit differentiation

Not every curve is the graph of a function y=f(x)y = f(x). A circle fails the vertical line test, and a curve like x3+y3=6xyx^3 + y^3 = 6xy can't be solved for yy in any reasonable way. Yet these curves still have tangent lines with slopes. Implicit differentiation finds those slopes without ever solving for yy.

Explicit versus implicit

The equation y=x2−3xy = x^2 - 3x defines yy explicitly: yy is alone on one side. The equation x2+y2=25x^2 + y^2 = 25 defines yy implicitly: xx and yy are mixed together, and near most points the curve still behaves like the graph of some function of xx.

You could solve the circle for yy and get two functions, y=25−x2y = \sqrt{25 - x^2} and y=−25−x2y = -\sqrt{25 - x^2}, then differentiate whichever half you need. Implicit differentiation is faster and works even when solving is impossible.

The key idea: yy is a function of xx

Treat yy as an unknown function y(x)y(x). Then any expression involving yy is a composite function, and the chain rule applies. For example,

ddx(y2)=2y⋅dydx,ddx(sin⁡y)=cos⁡y⋅dydx,ddx(ey)=ey⋅dydx.\frac{d}{dx}\big(y^2\big) = 2y \cdot \frac{dy}{dx}, \qquad \frac{d}{dx}\big(\sin y\big) = \cos y \cdot \frac{dy}{dx}, \qquad \frac{d}{dx}\big(e^y\big) = e^y \cdot \frac{dy}{dx}.

Compare with ddx(x2)=2x\dfrac{d}{dx}(x^2) = 2x. The only difference is the factor dydx\dfrac{dy}{dx}, which is the inner derivative. Differentiating a yy term always produces a dydx\dfrac{dy}{dx}.

Implicit differentiation

  1. Differentiate both sides of the equation with respect to xx. Every time you differentiate an expression containing yy, multiply by dydx\dfrac{dy}{dx} (chain rule). Use the product rule on terms like xyxy.
  2. Move every term containing dydx\dfrac{dy}{dx} to one side and everything else to the other.
  3. Factor out dydx\dfrac{dy}{dx} and divide.

The result usually contains both xx and yy. To get a slope at a point, substitute both coordinates.

Worked example: Tangent line to a circle

Find dydx\dfrac{dy}{dx} for x2+y2=25x^2 + y^2 = 25, then find the tangent line at (3,4)(3, 4).

Solution. Differentiate both sides:

2x+2ydydx=0⟹dydx=−xy.2x + 2y\frac{dy}{dx} = 0 \quad\Longrightarrow\quad \frac{dy}{dx} = -\frac{x}{y}.

At (3,4)(3, 4) the slope is −34-\dfrac{3}{4}, so the tangent line is y−4=−34(x−3)y - 4 = -\dfrac{3}{4}(x - 3), or y=−34x+254y = -\dfrac{3}{4}x + \dfrac{25}{4}.

This matches geometry: the radius to (3,4)(3, 4) has slope 43\dfrac{4}{3}, and a tangent to a circle is perpendicular to the radius.

The circle x² + y² = 25 with its tangent line at (3, 4), slope −3/4.Open in grapher →

Worked example: A curve you can't solve for y

Find dydx\dfrac{dy}{dx} for x3+y3=6xyx^3 + y^3 = 6xy, and find the slope at (3,3)(3, 3).

Solution. The right side is a product, so use the product rule there.

3x2+3y2dydx=6y+6xdydx3y2dydx−6xdydx=6y−3x2dydx(3y2−6x)=6y−3x2dydx=2y−x2y2−2x.\begin{aligned} 3x^2 + 3y^2\frac{dy}{dx} &= 6y + 6x\frac{dy}{dx} \\ 3y^2\frac{dy}{dx} - 6x\frac{dy}{dx} &= 6y - 3x^2 \\ \frac{dy}{dx}\big(3y^2 - 6x\big) &= 6y - 3x^2 \\ \frac{dy}{dx} &= \frac{2y - x^2}{y^2 - 2x}. \end{aligned}

First check that (3,3)(3, 3) is on the curve: 27+27=54=6⋅3⋅327 + 27 = 54 = 6 \cdot 3 \cdot 3. ✓ The slope there is 6−99−6=−1\dfrac{6 - 9}{9 - 6} = -1, so the tangent line is y=−x+6y = -x + 6.

The curve x³ + y³ = 6xy and its tangent line y = −x + 6 at (3, 3).Open in grapher →

Worked example: Chain rule and product rule together

Find dydx\dfrac{dy}{dx} if sin⁡(xy)=x\sin(xy) = x.

Solution. The outer function is sine and the inside is the product xyxy:

cos⁡(xy)⋅(y+xdydx)=1.\cos(xy) \cdot \left(y + x\frac{dy}{dx}\right) = 1.

Distribute, then isolate dydx\dfrac{dy}{dx}:

ycos⁡(xy)+xcos⁡(xy)dydx=1⟹dydx=1−ycos⁡(xy)xcos⁡(xy).y\cos(xy) + x\cos(xy)\frac{dy}{dx} = 1 \quad\Longrightarrow\quad \frac{dy}{dx} = \frac{1 - y\cos(xy)}{x\cos(xy)}.

Common mistake

The most common error is forgetting the dydx\dfrac{dy}{dx} when differentiating a yy term, for example writing ddx(y3)=3y2\dfrac{d}{dx}(y^3) = 3y^2. A close second is differentiating xyxy as 1⋅dydx1 \cdot \dfrac{dy}{dx} instead of using the product rule: ddx(xy)=y+xdydx\dfrac{d}{dx}(xy) = y + x\dfrac{dy}{dx}.

Horizontal and vertical tangents

When dydx\dfrac{dy}{dx} is a fraction ND\dfrac{N}{D} in xx and yy:

  • The tangent is horizontal where N=0N = 0 and D≠0D \ne 0.
  • The tangent is vertical where D=0D = 0 and N≠0N \ne 0.

In either case, you must also use the original equation to find the actual points on the curve.

Worked example: Vertical tangents on a tilted ellipse

For the curve x2−xy+y2=3x^2 - xy + y^2 = 3, find every point where the tangent line is vertical.

Solution. Differentiate: 2x−(y+xdydx)+2ydydx=02x - \left(y + x\dfrac{dy}{dx}\right) + 2y\dfrac{dy}{dx} = 0, so

dydx=y−2x2y−x.\frac{dy}{dx} = \frac{y - 2x}{2y - x}.

Vertical tangents need 2y−x=02y - x = 0, so x=2yx = 2y. Substitute into the curve: 4y2−2y2+y2=3y2=34y^2 - 2y^2 + y^2 = 3y^2 = 3, giving y=±1y = \pm 1. The points are (2,1)(2, 1) and (−2,−1)(-2, -1). At each, the numerator is ∓3≠0\mp 3 \ne 0, so both tangents really are vertical.

The curve x² − xy + y² = 3 has vertical tangent lines at (2, 1) and (−2, −1).Open in grapher →

Tip

Before you substitute a point, check that it actually lies on the curve. AP questions sometimes include this as a first step, and it catches copying errors.

Practice

Practice 1

Find dydx\dfrac{dy}{dx} for the ellipse x2+4y2=16x^2 + 4y^2 = 16. Give your answer in terms of xx and yy.

Enter an expression, e.g. 3x^2 - 2x + 1

Practice 2

Find the slope of the ellipse x2+4y2=16x^2 + 4y^2 = 16 at the point (2,3)(2, \sqrt{3}).

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 3

Find dydx\dfrac{dy}{dx} if xy2+x3=10xy^2 + x^3 = 10. Give your answer in terms of xx and yy.

Enter an expression, e.g. 3x^2 - 2x + 1

Practice 4

Find dydx\dfrac{dy}{dx} if ey=x2+ye^y = x^2 + y. Give your answer in terms of xx and yy.

Enter an expression, e.g. 3x^2 - 2x + 1

Practice 5

The point (3,1)(3, 1) lies on the curve x2y+y3=10x^2y + y^3 = 10. Find an equation of the tangent line at that point.

Enter an expression, e.g. 3x^2 - 2x + 1

Practice 6

(AP-style) If xy+y2=6xy + y^2 = 6, what is the value of dydx\dfrac{dy}{dx} at the point (1,2)(1, 2)?

Practice 7

(AP-style) At which points does the curve x2−xy+y2=3x^2 - xy + y^2 = 3 have a horizontal tangent line?