Implicit Differentiation

Explicit vs. implicit

A function given as y=f(x)y = f(x) is explicit. When xx and yy are tangled together in one equation instead, differentiate both sides with respect to xx, treating yy as a function of xx (so every yy term picks up a dydx\frac{dy}{dx} factor via the chain rule), then solve for dydx\frac{dy}{dx}.

The method, step by step

  1. Differentiate every term on both sides with respect to xx.
  2. Each time you differentiate a term containing yy, multiply by dydx\dfrac{dy}{dx} (the chain rule): ddx(y2)=2ydydx\dfrac{d}{dx}(y^2) = 2y\dfrac{dy}{dx}.
  3. Use the product rule on mixed terms: ddx(xy)=y+xdydx\dfrac{d}{dx}(xy) = y + x\dfrac{dy}{dx}.
  4. Move every term containing dydx\dfrac{dy}{dx} to one side and everything else to the other.
  5. Factor out dydx\dfrac{dy}{dx} and divide.

Worked example

Find dydx\dfrac{dy}{dx} if 2x+3y=sin⁡x2x + 3y = \sin x.

Solution: Differentiate both sides with respect to xx:

2+3dydx=cos⁡x  ⇒  dydx=cos⁡x−232 + 3\dfrac{dy}{dx} = \cos x \;\Rightarrow\; \dfrac{dy}{dx} = \dfrac{\cos x - 2}{3}

Worked example: a product term

Find dydx\dfrac{dy}{dx} if x2+xy+y2=7x^2 + xy + y^2 = 7.

Solution: The middle term needs the product rule:

2x+(y+xdydx)+2ydydx=02x + \left(y + x\dfrac{dy}{dx}\right) + 2y\dfrac{dy}{dx} = 0

Collecting the dydx\dfrac{dy}{dx} terms:

dydx(x+2y)=−(2x+y)  ⇒  dydx=−2x+yx+2y\dfrac{dy}{dx}(x + 2y) = -(2x + y) \;\Rightarrow\; \dfrac{dy}{dx} = -\dfrac{2x + y}{x + 2y}

Second derivatives

To find d2ydx2\dfrac{d^2y}{dx^2}, differentiate the expression for dydx\dfrac{dy}{dx} again, then substitute the first derivative back in.

For the circle x2+y2=25x^2 + y^2 = 25, find dydx\dfrac{dy}{dx} and d2ydx2\dfrac{d^2y}{dx^2}, and evaluate both at (3,4)(3, 4).

Solution: Differentiating once: 2x+2ydydx=02x + 2y\dfrac{dy}{dx} = 0, so dydx=−xy\dfrac{dy}{dx} = -\dfrac{x}{y}. Differentiating −xy-\dfrac{x}{y} with the quotient rule (remembering yy depends on xx):

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

The last step uses the original equation, x2+y2=25x^2 + y^2 = 25. At (3,4)(3, 4): dydx=−34\dfrac{dy}{dx} = -\dfrac{3}{4} and d2ydx2=−2564\dfrac{d^2y}{dx^2} = -\dfrac{25}{64}.

Worked example: an inverse trig identity

If y=cos⁡−1 ⁣(1−x21+x2)y = \cos^{-1}\!\left(\dfrac{1-x^2}{1+x^2}\right), find dydx\dfrac{dy}{dx}.

Solution: Substituting x=tan⁡θx = \tan\theta turns the fraction into the double-angle identity 1−tan⁡2θ1+tan⁡2θ=cos⁡2θ\dfrac{1-\tan^2\theta}{1+\tan^2\theta} = \cos 2\theta, so:

y=cos⁡−1(cos⁡2θ)=2θ=2tan⁡−1xy = \cos^{-1}(\cos 2\theta) = 2\theta = 2\tan^{-1}x

Differentiating this simpler explicit form:

dydx=21+x2\dfrac{dy}{dx} = \dfrac{2}{1+x^2}

Common mistakes

  • Leaving off dydx\dfrac{dy}{dx}. ddx(y3)=3y2dydx\dfrac{d}{dx}(y^3) = 3y^2\dfrac{dy}{dx}, not 3y23y^2. Every yy term picks up the factor.
  • Treating xyxy as a single variable. It is a product, so it needs the product rule: y+xdydxy + x\dfrac{dy}{dx}.
  • Forgetting that constants differentiate to 0. In x2+y2=25x^2 + y^2 = 25, the right side becomes 0, not 25.
  • Not substituting back for a second derivative. d2ydx2\dfrac{d^2y}{dx^2} usually still contains dydx\dfrac{dy}{dx} until you replace it with the first-derivative result.

Continue learning

Implicit differentiation is exactly the tool used to find the slope of a tangent line on a curve whose equation isn't solved for y.