---
title: Implicit differentiation
heading: Slopes of curves you can't solve for
eyebrow: A5 · Lesson 15 · Implicit differentiation
xp: 40
---

::: hook
A diode in series with a resistor obeys $V = IR + V_T\ln(I/I_s)$. You can't rearrange that to give $I$ as a formula in $V$, yet you still need $dI/dV$: it's the small-signal conductance that sets an amplifier's gain. Implicit differentiation finds slopes directly from an equation that ties two quantities together, without ever solving it. It works on circles, constant-power curves, and every relationship in electronics too tangled to untangle.
:::

::: play
- The curve is a constant-power load, $V \cdot I = P$: every point on it draws the same power.
- Move the operating point along it. The dashed line is the tangent. Is its slope ever positive?
- Read the slope in the strip and compare it with $-I/V$.
:::
:::

```sim plot
view: graph
x: V = 1..20 V
y: I = 0..5 A
slider: P = 5..30 = 12 W
slider: V0 = 2..20 step 0.1 = 6 V
plot: P/V | label: V·I = P
plot: P/V0 - (P/V0)/V0*(V - V0) | dashed | color: ch2 | label: tangent
point: V0, P/V0 | label: operating point
readout: dI/dV = -(P/V0)/V0 S | digits: 4
readout: incremental resistance = -V0^2/P Ω | digits: 4
```

::: predict
## A load draws constant power: $VI = P$. If its voltage rises a little, what happens to its current?

- [ ] It rises in proportion
- [x] It falls
- [ ] It stays the same
- [ ] It depends on the power

::: reveal
It falls. To keep $VI$ fixed, a higher voltage needs a lower current. Differentiating $VI = P$ gives $I + V\frac{dI}{dV} = 0$, so $\frac{dI}{dV} = -I/V$, which is negative. A switching power supply looks like this to its input: a **negative incremental resistance**, which can make the input filter oscillate.
:::
:::

::: nameit
## The method

When $x$ and $y$ are tied by an equation $F(x, y) = 0$, treat $y$ as a function of $x$ and differentiate both sides with respect to $x$. Every term containing $y$ gets a factor $\frac{dy}{dx}$ from the chain rule. Then solve for $\frac{dy}{dx}$.

**A circle**, $x^2 + y^2 = r^2$:

$$2x + 2y\frac{dy}{dx} = 0 \quad\Rightarrow\quad \frac{dy}{dx} = -\frac{x}{y}$$

At $(3, 4)$ on a circle of radius 5, the slope is $-\frac{3}{4}$: perpendicular to the radius, as geometry says it should be.

**Products of $x$ and $y$** need the product rule: $\frac{d}{dx}(xy) = y + x\frac{dy}{dx}$.

The answer usually contains both $x$ and $y$. That's fine: you evaluate it at a known point on the curve.

## In circuits: incremental resistance

For an element with an I-V relationship, $dV/dI$ is its **incremental (small-signal) resistance**: how the voltage changes for a small change in current around the operating point. For the diode with series resistor,

$$V = IR + V_T\ln\frac{I}{I_s} \quad\Rightarrow\quad \frac{dV}{dI} = R + \frac{V_T}{I}$$

So the diode's own small-signal resistance is $V_T/I$: 26 mV / 1 mA = 26 Ω at 1 mA, falling as the current rises. C5 uses this constantly. And $\frac{dI}{dV} = 1\big/\frac{dV}{dI}$ when both are defined, so you can differentiate whichever way the equation is easier.
:::

::: example
## Find the slope of $x^3 + y^3 = 6xy$ at the point $(3, 3)$.

::: solution
1. **Differentiate both sides.**
   $$3x^2 + 3y^2y' = 6y + 6xy'$$
2. **Collect the $y'$ terms.**
   $$y'(3y^2 - 6x) = 6y - 3x^2$$
   so
   $$y' = \frac{6y - 3x^2}{3y^2 - 6x}$$
3. **Evaluate at $(3, 3)$.**
   $$\begin{aligned} y' &= \frac{18 - 27}{27 - 18} \\ &= -1 \end{aligned}$$

**Answer:** the slope at $(3, 3)$ is $-1$.
:::
:::

::: example
## A diode with $V_T$ = 25.85 mV carries 2 mA through a 100 Ω resistor. What is the incremental resistance of the pair?

::: solution
1. **Differentiate $V$ with respect to $I$.**
   $$\begin{aligned} \frac{dV}{dI} &= R + \frac{V_T}{I} \\ &= 100 + \frac{0.02585}{0.002} \\ &= 100 + 12.9 \\ &= 112.9\ \Omega \end{aligned}$$
2. **A small signal.** A signal current of 10 µA on top of the 2 mA would add
   $$\begin{aligned} \Delta V &= 112.9 \times 10^{-5} \\ &= 1.13\ \text{mV} \end{aligned}$$
   across the pair.
3. **How it depends on the bias.** The diode's part, 12.9 Ω, would be twice as big at 1 mA.

**Answer:** the pair's incremental resistance is 112.9 Ω.
:::
:::

::: example
## Find $dy/dx$ on the curve $e^y + xy = e$ at the point $(0, 1)$.

::: solution
1. **Differentiate both sides with respect to $x$.** Treat $y$ as a function of $x$:
   $$e^y y' + y + xy' = 0$$
2. **Solve for the slope.**
   $$y' = \frac{-y}{e^y + x}$$
3. **Evaluate at $(0, 1)$.**
   $$\begin{aligned} y' &= -\frac{1}{e} \\ &= -0.368 \end{aligned}$$
4. **Why this helps.** The curve can't be solved for $y$ in closed form, yet its slope at any point comes out in one line.

**Answer:** $dy/dx = -1/e$, about $-0.368$, at $(0, 1)$.
:::
:::

::: check
given: x0 = 3 | 5 | 8; y0 = 4 | 12 | 6
answer: -x0/y0
tolerance: 0.5%

## On the circle $x^2 + y^2 = \given{x0}^2 + \given{y0}^2$, what is the slope at $(\given{x0}, \given{y0})$?

::: right
Right. $\frac{dy}{dx} = -x/y = -\given{x0}/\given{y0}$ = {answer}.
:::

::: misses
- [x0/y0] Mind the sign: $2x + 2yy' = 0$ gives $y' = -x/y$.
- [-y0/x0] Solve for $y'$ carefully: $y' = -x/y$.
- [any] Not yet. Differentiate both sides, with $\frac{d}{dx}y^2 = 2yy'$.
:::
:::

::: check
given: P = 10 | 24 | 60; V = 5 | 12
answer: -P/V^2
unit: A/V

## A constant-power load draws {P} W. At {V} V, what is $dI/dV$?

::: right
Right. $I = P/V$ and $\frac{dI}{dV} = -I/V = -P/V^2$ = {answer}.
:::

::: misses
- [P/V^2] Differentiating $VI = P$ gives $I + V\frac{dI}{dV} = 0$, so the slope is negative.
- [-P/V] That's $-I$. Divide by $V$ again.
- [any] Not yet. Differentiate $VI = P$ with respect to $V$.
:::
:::

::: check
given: I = 0.5 | 1 | 2 | 10; R = 10 | 50 | 100
answer: R + 0.02585/(I*1e-3)
unit: Ω

## A diode ($V_T$ = 25.85 mV) in series with {R} Ω carries {I} mA. Using $V = IR + V_T\ln(I/I_s)$, what is the incremental resistance $dV/dI$?

::: right
Right. $R + V_T/I$ = {answer}.
:::

::: misses
- [0.02585/(I*1e-3)] That's the diode alone. Add the series resistor.
- [R + 0.02585/I] Put the current in amperes.
- [R + 0.02585*I*1e-3] The diode term is $V_T$ divided by the current.
- [any] Not yet. Differentiate $V = IR + V_T\ln(I/I_s)$ with respect to $I$.
:::
:::

::: check
given: a = 2 | 3; b = 1 | 4
answer: -(2*a + b)/(a + 2*b)
tolerance: 0.5%

## Find the slope of $x^2 + xy + y^2 = \given{a}^2 + \given{a}\cdot\given{b} + \given{b}^2$ at the point $(\given{a}, \given{b})$.

::: right
Right. $2x + y + xy' + 2yy' = 0$, so $y' = -\frac{2x + y}{x + 2y}$ = {answer}.
:::

::: misses
- [-2*a/(2*b)] The $xy$ term needs the product rule: it contributes $y + xy'$.
- [-(2*a + b)/(2*b)] The $xy$ term also has an $xy'$ part. Collect all the $y'$ terms.
- [any] Not yet. Differentiate each term, using the product rule on $xy$.
:::
:::

::: check
kind: parts
given: a = 2 | 3; b = 3 | 5

## The curve $x^2 + \given{a}y^2 = \given{b}$ passes through a point with $x = 1$ and $y > 0$.

::: part
answer: sqrt((b - 1)/a)
tolerance: 0.5%

### What is $y$ there?

::: misses
- [any] Put $x = 1$ in and solve for $y$.
:::
:::

::: part
answer: -1/(a*sqrt((b - 1)/a))
tolerance: 0.5%

### What is the slope $dy/dx$ there?

::: misses
- [-1/sqrt((b - 1)/a)] Differentiating $ay^2$ gives $2ayy'$: keep the {a}.
- [any] $2x + 2ayy' = 0$.
:::
:::

::: part
answer: sqrt((b - 1)/a) + 1/(a*sqrt((b - 1)/a))
tolerance: 0.5%

### Where does the tangent line there cross the $y$ axis?

::: misses
- [any] $y_0 - y'(x_0)\cdot x_0$.
:::
:::
:::

::: check
kind: derivation
vars: a = 0.5..3, x = -2..2, y = 0.5..3

## Find the slope of the ellipse $x^2 + ay^2 = b$ by implicit differentiation.

::: step
answer: 2*a*y

### Differentiating $ay^2$ with respect to $x$ gives $(\ldots)\,y'$. What multiplies $y'$?
:::

::: step
answer: -x/(a*y)

### Solve $2x + 2ayy' = 0$ for $y'$.
:::

::: right
Right. $y' = -\frac{x}{ay}$: zero at the top and bottom, infinite at the sides.
:::
:::

::: explain
## Why does the derivative from implicit differentiation usually contain both $x$ and $y$?

::: model
An implicit equation can describe a curve that has several $y$ values for one $x$, like a circle's top and bottom halves, and the slope is different on each. The derivative needs to know which point you mean, so it's expressed in terms of both coordinates. You evaluate it at a specific point on the curve, where $x$ and $y$ are both known.
:::
:::

::: practice

::: check
given: r = 5 | 13; x0 = 3 | 4
answer: -x0/sqrt(r^2 - x0^2)
tolerance: 0.5%

## On the upper half of $x^2 + y^2 = \given{r}^2$, what is the slope at $x$ = {x0}?

::: misses
- [x0/sqrt(r^2 - x0^2)] The slope is $-x/y$.
- [any] Find $y$, then $-x/y$.
:::
:::

::: check
given: I = 0.1 | 1 | 5
answer: 0.02585/(I*1e-3)
unit: Ω

## What is a diode's small-signal resistance $V_T/I$ at {I} mA ($V_T$ = 25.85 mV)?

::: misses
- [0.02585/I] Use amperes.
- [any] $r_d = V_T/I$.
:::
:::

::: check
given: c = 4 | 9 | 16; x0 = 1 | 2
answer: -c/x0^2

## For the curve $xy = \given{c}$, what is $dy/dx$ at $x$ = {x0}?

::: misses
- [c/x0^2] The slope is negative.
- [any] $y + xy' = 0$, so $y' = -y/x = -c/x^2$.
:::
:::
:::
