Chapter 13: Implicit Differentiation

Beginner

13.1 Explicit and Implicit Functions

Explicit and Implicit Functions

Explicit function: A function written in the form $y = f(x)$

Examples: $y = x^2 + 3x$, $y = \sin x$

Implicit function: A relationship written in the form $F(x, y) = 0$

Examples: $x^2 + y^2 = 1$ (a circle), $x^2 + xy + y^2 = 3$

An implicit function cannot always be solved into the form $y = f(x)$. Even so, if we treat $y$ as a function of $x$ and differentiate both sides, we can find $\dfrac{dy}{dx}$. However, this method cannot be used at points where the expression we divide by at the end is $0$.

Examples of Explicit and Implicit Functions Explicit Implicit
$y = x^2$
Each $x$ has exactly one $y$
$x^2 + y^2 = 1$
A circle has two $y$ values for one $x$
The upper half of the circle can be written as $y = \sqrt{1 - x^2}$
Figure 1: The explicit function $y = x^2$ (left) and the implicit function $x^2 + y^2 = 1$ (right). On the circle, for example, $x = \dfrac{1}{2}$ corresponds to two values, $y = \pm\dfrac{\sqrt{3}}{2}$ (the gray dashed line).

13.2 How to Use Implicit Differentiation

Steps for Implicit Differentiation
  1. Differentiate both sides of the equation $F(x, y) = 0$ with respect to $x$.
  2. Treat $y$ as a function of $x$ and apply the chain rule (so $\dfrac{dy}{dx}$ appears).
  3. Solve for $\dfrac{dy}{dx}$.
Example 1: Differentiate the circle $x^2 + y^2 = 1$

Step 1: Differentiate both sides with respect to $x$.

Left side: $\dfrac{d}{dx}(x^2 + y^2) = \dfrac{d}{dx}x^2 + \dfrac{d}{dx}y^2$

When differentiating $y^2$, use the chain rule because $y$ is a function of $x$:

$$\dfrac{d}{dx}y^2 = 2y \cdot \dfrac{dy}{dx}$$

Right side: $\dfrac{d}{dx}1 = 0$

Step 2: Write out the equation.

$$2x + 2y \dfrac{dy}{dx} = 0$$

Step 3: Solve for $\dfrac{dy}{dx}$.

$$2y \dfrac{dy}{dx} = -2x$$ $$\dfrac{dy}{dx} = -\dfrac{x}{y}$$

This holds when $y \ne 0$. At the points $(\pm 1, 0)$, where $y = 0$, we cannot divide by $y$, and the tangent line is vertical (Figure 2).

Tangents to the circle $x^2 + y^2 = 1$
$\left(\frac{\sqrt{2}}{2}, \frac{\sqrt{2}}{2}\right)$
Slope $-1$
$(1, 0)$
Vertical (slope is undefined)
$(0, 1)$
Horizontal (slope $0$)
At points where $y \ne 0$, the slope is $\frac{dy}{dx} = -\frac{x}{y}$
Figure 2: Tangents to the circle $x^2 + y^2 = 1$. At $\left(\dfrac{\sqrt{2}}{2}, \dfrac{\sqrt{2}}{2}\right)$, the slope is $-\dfrac{x}{y} = -1$; at $(0, 1)$, it is $0$ (horizontal). At $(1, 0)$, $y = 0$, so the formula cannot be used, and the tangent is vertical.
Example 2: Differentiate $x^2 + xy + y^2 = 7$

Step 1: Differentiate both sides with respect to $x$.

Use the product rule to differentiate $xy$:

$$\dfrac{d}{dx}(xy) = 1 \cdot y + x \cdot \dfrac{dy}{dx} = y + x\dfrac{dy}{dx}$$

So:

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

Step 2: Simplify.

$$2x + y + x\dfrac{dy}{dx} + 2y\dfrac{dy}{dx} = 0$$ $$x\dfrac{dy}{dx} + 2y\dfrac{dy}{dx} = -2x - y$$ $$(x + 2y)\dfrac{dy}{dx} = -(2x + y)$$

Step 3: Solve for $\dfrac{dy}{dx}$.

$$\dfrac{dy}{dx} = -\dfrac{2x + y}{x + 2y}$$

This holds when $x + 2y \ne 0$. At points where $x + 2y = 0$, the tangent line is vertical.

13.3 Applications of Implicit Differentiation

Example 3: Differentiate the ellipse $\dfrac{x^2}{a^2} + \dfrac{y^2}{b^2} = 1$

Step 1: Differentiate both sides with respect to $x$.

$$\dfrac{2x}{a^2} + \dfrac{2y}{b^2} \cdot \dfrac{dy}{dx} = 0$$

Step 2: Solve for $\dfrac{dy}{dx}$.

$$\dfrac{2y}{b^2} \dfrac{dy}{dx} = -\dfrac{2x}{a^2}$$ $$\dfrac{dy}{dx} = -\dfrac{b^2 x}{a^2 y}$$

This holds when $y \ne 0$. At the points $(\pm a, 0)$, where $y = 0$, the tangent line is vertical.

Example 4: Differentiate $e^{xy} = x + y$

Step 1: Differentiate both sides with respect to $x$.

Left side: When we differentiate $xy$ in $e^{xy}$, we get $y + x\dfrac{dy}{dx}$, so:

$$\dfrac{d}{dx}e^{xy} = e^{xy}\left(y + x\dfrac{dy}{dx}\right)$$

Right side:

$$\dfrac{d}{dx}(x + y) = 1 + \dfrac{dy}{dx}$$

Step 2: Write the equation.

$$e^{xy}\left(y + x\dfrac{dy}{dx}\right) = 1 + \dfrac{dy}{dx}$$

Step 3: Expand and simplify.

$$ye^{xy} + xe^{xy}\dfrac{dy}{dx} = 1 + \dfrac{dy}{dx}$$ $$xe^{xy}\dfrac{dy}{dx} - \dfrac{dy}{dx} = 1 - ye^{xy}$$ $$(xe^{xy} - 1)\dfrac{dy}{dx} = 1 - ye^{xy}$$

Step 4: Solve for $\dfrac{dy}{dx}$.

$$\dfrac{dy}{dx} = \dfrac{1 - ye^{xy}}{xe^{xy} - 1}$$

This holds when $xe^{xy} - 1 \ne 0$.

Example 5: Differentiate $\sin(x + y) = y^2 \cos x$

Step 1: Differentiate both sides with respect to $x$.

Left side:

$$\dfrac{d}{dx}\sin(x + y) = \cos(x + y) \cdot \left(1 + \dfrac{dy}{dx}\right)$$

Right side (product rule):

$$\dfrac{d}{dx}(y^2 \cos x) = 2y\dfrac{dy}{dx} \cos x + y^2(-\sin x)$$

Step 2: Write the equation.

$$\cos(x+y)\left(1 + \dfrac{dy}{dx}\right) = 2y\dfrac{dy}{dx}\cos x - y^2\sin x$$

Step 3: Expand and simplify.

$$\cos(x+y) + \cos(x+y)\dfrac{dy}{dx} = 2y\cos x \dfrac{dy}{dx} - y^2\sin x$$ $$\cos(x+y)\dfrac{dy}{dx} - 2y\cos x \dfrac{dy}{dx} = -y^2\sin x - \cos(x+y)$$ $$[\cos(x+y) - 2y\cos x]\dfrac{dy}{dx} = -y^2\sin x - \cos(x+y)$$

Step 4: Solve for $\dfrac{dy}{dx}$.

$$\dfrac{dy}{dx} = \dfrac{-y^2\sin x - \cos(x+y)}{\cos(x+y) - 2y\cos x}$$

This holds when $\cos(x+y) - 2y\cos x \ne 0$.

13.4 Second Derivatives of Implicit Functions

We can also find the second derivative of an implicit function.

Example: The second derivative of the circle $x^2 + y^2 = r^2$

The first derivative is (when $y \ne 0$):

$$\dfrac{dy}{dx} = -\dfrac{x}{y}$$

Differentiate this again with respect to $x$. Use the quotient rule:

$$\dfrac{d^2y}{dx^2} = \dfrac{d}{dx}\left(-\dfrac{x}{y}\right) = -\dfrac{1 \cdot y - x \cdot \dfrac{dy}{dx}}{y^2}$$

Substitute $\dfrac{dy}{dx} = -\dfrac{x}{y}$:

$$= -\dfrac{y - x \cdot \left(-\dfrac{x}{y}\right)}{y^2} = -\dfrac{y + \dfrac{x^2}{y}}{y^2}$$

Combine the fractions:

$$= -\dfrac{\dfrac{y^2 + x^2}{y}}{y^2} = -\dfrac{y^2 + x^2}{y^3}$$

Since $x^2 + y^2 = r^2$:

$$\dfrac{d^2y}{dx^2} = -\dfrac{r^2}{y^3}$$

This formula also holds only when $y \ne 0$.

13.5 Summary of Implicit Differentiation

Steps for Implicit Differentiation Step 1 Step 2 Step 3 Key Points
Differentiate both sides
Collect the $y'$ terms
Solve for $y'$
• Treat $y$ as a function of $x$ ($y = y(x)$)
• Differentiate $y^2$ → $2y \cdot y'$, and $xy$ → $y + x \cdot y'$
• The formula cannot be used where the expression we divide by is $0$
Figure 3: Steps for implicit differentiation. Treat $y$ as a function of $x$, differentiate both sides, and solve for $y' = \dfrac{dy}{dx}$.

Frequently Asked Questions

When do we use implicit differentiation?

Use it to differentiate equations that cannot be solved for $y$ as an explicit function of $x$, or are difficult to solve that way. Examples include $x^2 + y^2 = r^2$ (a circle) and $x^3 + y^3 = 3xy$. Differentiate both sides with respect to $x$ to find $\dfrac{dy}{dx}$.

What do we get when we differentiate $y^2$ with respect to $x$ using implicit differentiation?

Since $y$ is treated as a function of $x$, the chain rule gives $\dfrac{d(y^2)}{dx} = 2y \cdot \dfrac{dy}{dx}$. A key point in implicit differentiation is that every time you differentiate a term containing $y$, it is multiplied by $\dfrac{dy}{dx}$.

Do implicit and explicit differentiation give the same result?

Yes. For example, implicit differentiation of $x^2 + y^2 = 1$ gives $\dfrac{dy}{dx} = -\dfrac{x}{y}$. For the upper half of the circle ($y \gt 0$), writing $y = \sqrt{1-x^2}$ and differentiating explicitly gives $-\dfrac{x}{\sqrt{1-x^2}} = -\dfrac{x}{y}$, the same result. The lower half can be checked in the same way using $y = -\sqrt{1-x^2}$.

Practice Problems

Practice 1

Find $\dfrac{dy}{dx}$ for each of the following implicit functions.

  1. $x^3 + y^3 = 6xy$
  2. $xy + y^2 = 1$
  3. $\sqrt{x} + \sqrt{y} = 4$
Practice 2

For the ellipse $\dfrac{x^2}{9} + \dfrac{y^2}{4} = 1$:

  1. Find $\dfrac{dy}{dx}$.
  2. Find the equation of the tangent line at $(0, 2)$.
Practice 3

For $x^2 + y^2 = 25$, find the equation of the tangent line at $(3, 4)$.

Show Answers

Answers to Practice 1

  1. $3x^2 + 3y^2\dfrac{dy}{dx} = 6y + 6x\dfrac{dy}{dx}$
    $(3y^2 - 6x)\dfrac{dy}{dx} = 6y - 3x^2$
    $\dfrac{dy}{dx} = \dfrac{6y - 3x^2}{3y^2 - 6x} = \dfrac{2y - x^2}{y^2 - 2x}$ (when $y^2 - 2x \ne 0$)
  2. $y + x\dfrac{dy}{dx} + 2y\dfrac{dy}{dx} = 0$
    $(x + 2y)\dfrac{dy}{dx} = -y$
    $\dfrac{dy}{dx} = -\dfrac{y}{x + 2y}$ (when $x + 2y \ne 0$)
  3. $\dfrac{1}{2\sqrt{x}} + \dfrac{1}{2\sqrt{y}}\dfrac{dy}{dx} = 0$
    $\dfrac{dy}{dx} = -\dfrac{\sqrt{y}}{\sqrt{x}} = -\sqrt{\dfrac{y}{x}}$ (when $x \gt 0$, $y \gt 0$)

Answers to Practice 2

  1. $\dfrac{2x}{9} + \dfrac{2y}{4}\dfrac{dy}{dx} = 0$
    $\dfrac{dy}{dx} = -\dfrac{4x}{9y}$ (when $y \ne 0$)
  2. At $(0, 2)$, $\dfrac{dy}{dx} = -\dfrac{4 \cdot 0}{9 \cdot 2} = 0$
    The tangent line is horizontal: $y = 2$

Answer to Practice 3

Since $\dfrac{dy}{dx} = -\dfrac{x}{y}$, the slope at $(3, 4)$ is $-\dfrac{3}{4}$.

Tangent line: $y - 4 = -\dfrac{3}{4}(x - 3)$

Simplifying: $y = -\dfrac{3}{4}x + \dfrac{9}{4} + 4 = -\dfrac{3}{4}x + \dfrac{25}{4}$

Or: $3x + 4y = 25$