---
title: "Nonlinear systems: Newton's method in several variables"
heading: Linearize everything at once, solve, repeat: how a circuit simulator works
eyebrow: "A13 · Lesson 34 · Nonlinear systems: Newton's method in several variables"
xp: 40
---

::: hook
Two diodes in a resistor network: two node voltages, two KCL equations, each with an exponential in it. Newton's method from lesson 6 extends directly. At the current guess, replace every equation by its tangent plane, which turns the problem into a linear system whose matrix is the **Jacobian**; solve it, move, and repeat. Near the answer the error squares each step, just as in one dimension. This is exactly the inner loop of SPICE and of the simulator behind this course's circuit sims: each Newton step solves a linear circuit in which every diode has been replaced by a conductance and a current source.
:::

::: play
- The circle $x^2 + y^2 = 4$ and the curve $y = 1 - e^x$ cross at two points; those are the solutions of $F(x, y) = 0$. Drag the start $x_0$ with the sliders.
- The dots are the first two Newton steps. From (−1, 1), $x_2$ is already within 0.05 of the crossing near (−1.82, 0.84), and the readout shows $\lvert F\rvert$ collapsing.
- Start near where the curves' tangents line up (the Jacobian is nearly singular) and the first step flies off: the multidimensional version of a flat spot.
:::
:::

```sim plot
view: flow
x: x = -3..3
y: y = -3..3
slider: x0 = -2.8..2.8 step 0.05 = -1
slider: y0 = -2.8..2.8 step 0.05 = 1
shade: abs(x^2 + y^2 - 4) + abs(exp(x) + y - 1) | scale: 6
path: 2*cos(u), 2*sin(u) | over: u = 0..2*pi
path: u, 1 - exp(u) | over: u = -3..1.38
dot: x0, y0 | label: x₀
dot: (x0 - (((x0)^2 + (y0)^2 - 4) - (exp(x0) + (y0) - 1)*2*(y0))/(2*(x0) - 2*(y0)*exp(x0))), (y0 - (2*(x0)*(exp(x0) + (y0) - 1) - exp(x0)*((x0)^2 + (y0)^2 - 4))/(2*(x0) - 2*(y0)*exp(x0))) | label: x₁
dot: ((x0 - (((x0)^2 + (y0)^2 - 4) - (exp(x0) + (y0) - 1)*2*(y0))/(2*(x0) - 2*(y0)*exp(x0))) - ((((x0 - (((x0)^2 + (y0)^2 - 4) - (exp(x0) + (y0) - 1)*2*(y0))/(2*(x0) - 2*(y0)*exp(x0))))^2 + ((y0 - (2*(x0)*(exp(x0) + (y0) - 1) - exp(x0)*((x0)^2 + (y0)^2 - 4))/(2*(x0) - 2*(y0)*exp(x0))))^2 - 4) - (exp((x0 - (((x0)^2 + (y0)^2 - 4) - (exp(x0) + (y0) - 1)*2*(y0))/(2*(x0) - 2*(y0)*exp(x0)))) + ((y0 - (2*(x0)*(exp(x0) + (y0) - 1) - exp(x0)*((x0)^2 + (y0)^2 - 4))/(2*(x0) - 2*(y0)*exp(x0)))) - 1)*2*((y0 - (2*(x0)*(exp(x0) + (y0) - 1) - exp(x0)*((x0)^2 + (y0)^2 - 4))/(2*(x0) - 2*(y0)*exp(x0)))))/(2*((x0 - (((x0)^2 + (y0)^2 - 4) - (exp(x0) + (y0) - 1)*2*(y0))/(2*(x0) - 2*(y0)*exp(x0)))) - 2*((y0 - (2*(x0)*(exp(x0) + (y0) - 1) - exp(x0)*((x0)^2 + (y0)^2 - 4))/(2*(x0) - 2*(y0)*exp(x0))))*exp((x0 - (((x0)^2 + (y0)^2 - 4) - (exp(x0) + (y0) - 1)*2*(y0))/(2*(x0) - 2*(y0)*exp(x0)))))), ((y0 - (2*(x0)*(exp(x0) + (y0) - 1) - exp(x0)*((x0)^2 + (y0)^2 - 4))/(2*(x0) - 2*(y0)*exp(x0))) - (2*((x0 - (((x0)^2 + (y0)^2 - 4) - (exp(x0) + (y0) - 1)*2*(y0))/(2*(x0) - 2*(y0)*exp(x0))))*(exp((x0 - (((x0)^2 + (y0)^2 - 4) - (exp(x0) + (y0) - 1)*2*(y0))/(2*(x0) - 2*(y0)*exp(x0)))) + ((y0 - (2*(x0)*(exp(x0) + (y0) - 1) - exp(x0)*((x0)^2 + (y0)^2 - 4))/(2*(x0) - 2*(y0)*exp(x0)))) - 1) - exp((x0 - (((x0)^2 + (y0)^2 - 4) - (exp(x0) + (y0) - 1)*2*(y0))/(2*(x0) - 2*(y0)*exp(x0))))*(((x0 - (((x0)^2 + (y0)^2 - 4) - (exp(x0) + (y0) - 1)*2*(y0))/(2*(x0) - 2*(y0)*exp(x0))))^2 + ((y0 - (2*(x0)*(exp(x0) + (y0) - 1) - exp(x0)*((x0)^2 + (y0)^2 - 4))/(2*(x0) - 2*(y0)*exp(x0))))^2 - 4))/(2*((x0 - (((x0)^2 + (y0)^2 - 4) - (exp(x0) + (y0) - 1)*2*(y0))/(2*(x0) - 2*(y0)*exp(x0)))) - 2*((y0 - (2*(x0)*(exp(x0) + (y0) - 1) - exp(x0)*((x0)^2 + (y0)^2 - 4))/(2*(x0) - 2*(y0)*exp(x0))))*exp((x0 - (((x0)^2 + (y0)^2 - 4) - (exp(x0) + (y0) - 1)*2*(y0))/(2*(x0) - 2*(y0)*exp(x0)))))) | label: x₂
readout: |F| at x₂ = sqrt((((x0 - (((x0)^2 + (y0)^2 - 4) - (exp(x0) + (y0) - 1)*2*(y0))/(2*(x0) - 2*(y0)*exp(x0))) - ((((x0 - (((x0)^2 + (y0)^2 - 4) - (exp(x0) + (y0) - 1)*2*(y0))/(2*(x0) - 2*(y0)*exp(x0))))^2 + ((y0 - (2*(x0)*(exp(x0) + (y0) - 1) - exp(x0)*((x0)^2 + (y0)^2 - 4))/(2*(x0) - 2*(y0)*exp(x0))))^2 - 4) - (exp((x0 - (((x0)^2 + (y0)^2 - 4) - (exp(x0) + (y0) - 1)*2*(y0))/(2*(x0) - 2*(y0)*exp(x0)))) + ((y0 - (2*(x0)*(exp(x0) + (y0) - 1) - exp(x0)*((x0)^2 + (y0)^2 - 4))/(2*(x0) - 2*(y0)*exp(x0)))) - 1)*2*((y0 - (2*(x0)*(exp(x0) + (y0) - 1) - exp(x0)*((x0)^2 + (y0)^2 - 4))/(2*(x0) - 2*(y0)*exp(x0)))))/(2*((x0 - (((x0)^2 + (y0)^2 - 4) - (exp(x0) + (y0) - 1)*2*(y0))/(2*(x0) - 2*(y0)*exp(x0)))) - 2*((y0 - (2*(x0)*(exp(x0) + (y0) - 1) - exp(x0)*((x0)^2 + (y0)^2 - 4))/(2*(x0) - 2*(y0)*exp(x0))))*exp((x0 - (((x0)^2 + (y0)^2 - 4) - (exp(x0) + (y0) - 1)*2*(y0))/(2*(x0) - 2*(y0)*exp(x0))))))^2 + ((y0 - (2*(x0)*(exp(x0) + (y0) - 1) - exp(x0)*((x0)^2 + (y0)^2 - 4))/(2*(x0) - 2*(y0)*exp(x0))) - (2*((x0 - (((x0)^2 + (y0)^2 - 4) - (exp(x0) + (y0) - 1)*2*(y0))/(2*(x0) - 2*(y0)*exp(x0))))*(exp((x0 - (((x0)^2 + (y0)^2 - 4) - (exp(x0) + (y0) - 1)*2*(y0))/(2*(x0) - 2*(y0)*exp(x0)))) + ((y0 - (2*(x0)*(exp(x0) + (y0) - 1) - exp(x0)*((x0)^2 + (y0)^2 - 4))/(2*(x0) - 2*(y0)*exp(x0)))) - 1) - exp((x0 - (((x0)^2 + (y0)^2 - 4) - (exp(x0) + (y0) - 1)*2*(y0))/(2*(x0) - 2*(y0)*exp(x0))))*(((x0 - (((x0)^2 + (y0)^2 - 4) - (exp(x0) + (y0) - 1)*2*(y0))/(2*(x0) - 2*(y0)*exp(x0))))^2 + ((y0 - (2*(x0)*(exp(x0) + (y0) - 1) - exp(x0)*((x0)^2 + (y0)^2 - 4))/(2*(x0) - 2*(y0)*exp(x0))))^2 - 4))/(2*((x0 - (((x0)^2 + (y0)^2 - 4) - (exp(x0) + (y0) - 1)*2*(y0))/(2*(x0) - 2*(y0)*exp(x0)))) - 2*((y0 - (2*(x0)*(exp(x0) + (y0) - 1) - exp(x0)*((x0)^2 + (y0)^2 - 4))/(2*(x0) - 2*(y0)*exp(x0))))*exp((x0 - (((x0)^2 + (y0)^2 - 4) - (exp(x0) + (y0) - 1)*2*(y0))/(2*(x0) - 2*(y0)*exp(x0))))))^2 - 4)^2 + (exp(((x0 - (((x0)^2 + (y0)^2 - 4) - (exp(x0) + (y0) - 1)*2*(y0))/(2*(x0) - 2*(y0)*exp(x0))) - ((((x0 - (((x0)^2 + (y0)^2 - 4) - (exp(x0) + (y0) - 1)*2*(y0))/(2*(x0) - 2*(y0)*exp(x0))))^2 + ((y0 - (2*(x0)*(exp(x0) + (y0) - 1) - exp(x0)*((x0)^2 + (y0)^2 - 4))/(2*(x0) - 2*(y0)*exp(x0))))^2 - 4) - (exp((x0 - (((x0)^2 + (y0)^2 - 4) - (exp(x0) + (y0) - 1)*2*(y0))/(2*(x0) - 2*(y0)*exp(x0)))) + ((y0 - (2*(x0)*(exp(x0) + (y0) - 1) - exp(x0)*((x0)^2 + (y0)^2 - 4))/(2*(x0) - 2*(y0)*exp(x0)))) - 1)*2*((y0 - (2*(x0)*(exp(x0) + (y0) - 1) - exp(x0)*((x0)^2 + (y0)^2 - 4))/(2*(x0) - 2*(y0)*exp(x0)))))/(2*((x0 - (((x0)^2 + (y0)^2 - 4) - (exp(x0) + (y0) - 1)*2*(y0))/(2*(x0) - 2*(y0)*exp(x0)))) - 2*((y0 - (2*(x0)*(exp(x0) + (y0) - 1) - exp(x0)*((x0)^2 + (y0)^2 - 4))/(2*(x0) - 2*(y0)*exp(x0))))*exp((x0 - (((x0)^2 + (y0)^2 - 4) - (exp(x0) + (y0) - 1)*2*(y0))/(2*(x0) - 2*(y0)*exp(x0))))))) + ((y0 - (2*(x0)*(exp(x0) + (y0) - 1) - exp(x0)*((x0)^2 + (y0)^2 - 4))/(2*(x0) - 2*(y0)*exp(x0))) - (2*((x0 - (((x0)^2 + (y0)^2 - 4) - (exp(x0) + (y0) - 1)*2*(y0))/(2*(x0) - 2*(y0)*exp(x0))))*(exp((x0 - (((x0)^2 + (y0)^2 - 4) - (exp(x0) + (y0) - 1)*2*(y0))/(2*(x0) - 2*(y0)*exp(x0)))) + ((y0 - (2*(x0)*(exp(x0) + (y0) - 1) - exp(x0)*((x0)^2 + (y0)^2 - 4))/(2*(x0) - 2*(y0)*exp(x0)))) - 1) - exp((x0 - (((x0)^2 + (y0)^2 - 4) - (exp(x0) + (y0) - 1)*2*(y0))/(2*(x0) - 2*(y0)*exp(x0))))*(((x0 - (((x0)^2 + (y0)^2 - 4) - (exp(x0) + (y0) - 1)*2*(y0))/(2*(x0) - 2*(y0)*exp(x0))))^2 + ((y0 - (2*(x0)*(exp(x0) + (y0) - 1) - exp(x0)*((x0)^2 + (y0)^2 - 4))/(2*(x0) - 2*(y0)*exp(x0))))^2 - 4))/(2*((x0 - (((x0)^2 + (y0)^2 - 4) - (exp(x0) + (y0) - 1)*2*(y0))/(2*(x0) - 2*(y0)*exp(x0)))) - 2*((y0 - (2*(x0)*(exp(x0) + (y0) - 1) - exp(x0)*((x0)^2 + (y0)^2 - 4))/(2*(x0) - 2*(y0)*exp(x0))))*exp((x0 - (((x0)^2 + (y0)^2 - 4) - (exp(x0) + (y0) - 1)*2*(y0))/(2*(x0) - 2*(y0)*exp(x0)))))) - 1)^2)
```

::: predict
## A circuit has 1000 nodes and 50 diodes. What does each Newton step have to solve?

- [ ] 50 separate scalar equations
- [x] One 1000 × 1000 linear system: the circuit with each diode replaced by its tangent conductance and a current source
- [ ] A 50 × 50 nonlinear system
- [ ] Nothing: Newton needs no linear solve

::: reveal
One linear system the size of the whole circuit. The Jacobian of the nodal equations is the conductance matrix of a linear circuit, the **companion model**, in which each diode becomes $g_d = \frac{I_s}{nV_T}e^{V_D/nV_T}$ in parallel with a current source. Since the matrix is sparse, solving it is far cheaper than its size suggests (lesson 49).
:::
:::

::: nameit
## Newton's method for F(x) = 0

For n equations in n unknowns, with Jacobian $J_{ij} = \partial F_i/\partial x_j$:

$$J(x_k)\,\Delta_k = -F(x_k), \qquad x_{k+1} = x_k + \Delta_k$$

Near a solution where J is nonsingular, convergence is quadratic. Each step costs forming J (analytically, or with n extra evaluations of F by finite differences) and one linear solve.

## Circuits

Writing KCL at each node, a diode from node a to node b contributes $I_d = I_s(e^{V/nV_T} - 1)$ with $V = V_a - V_b$. Its linearization at the current guess $V^{(k)}$ is

$$I_d \approx g_dV + I_{eq}, \qquad g_d = \frac{I_s}{nV_T}e^{V^{(k)}/nV_T}, \qquad I_{eq} = I_d(V^{(k)}) - g_dV^{(k)}$$

a conductance and a current source, stamped into the nodal matrix like any resistor and source. Transistors linearize the same way into conductances and controlled sources.

## Keeping it on track

- **Limiting:** cap each diode's voltage change at a few $nV_T$ (lesson 6's overflow).
- **Damping:** if $\lVert F(x_k + \Delta)\rVert$ isn't smaller than $\lVert F(x_k)\rVert$, try $x_k + \frac12\Delta$, and so on (a line search).
- **Continuation:** ramp the sources up from zero, or start with a small conductance across every junction and remove it (source and gmin stepping), solving each easier problem from the last one's answer.
- **Quasi-Newton (Broyden):** update an approximate Jacobian from successive steps instead of recomputing it.
:::

::: example
## A 5 V source feeds node 1 through 1 kΩ; diode D1 goes from node 1 to ground, and 1 kΩ connects node 1 to node 2, where D2 goes to ground ($I_s = 10^{-14}$ A, $nV_T$ = 25.85 mV). Solve by Newton from (0.7, 0.6) V.

::: solution
1. **The residuals.** Their norms are $1.6 \times 10^{-3}$, $1.9 \times 10^{-4}$, $4.0 \times 10^{-6}$, $1.9 \times 10^{-9}$ and $4 \times 10^{-16}$ A: quadratic once it's close.
2. **The solution.**
   $$\begin{aligned} V_1 &= 0.691903\ \text{V} \\ V_2 &= 0.594530\ \text{V} \end{aligned}$$
3. **Check the currents.** D2 carries
   $$\frac{V_1 - V_2}{1\ \text{k}\Omega} = 97\ \text{µA}$$
   and D1 the rest of the 4.3 mA.

**Answer:** $V_1 = 0.691903$ V and $V_2 = 0.594530$ V, with 97 µA in D2.
:::
:::

::: example
## Linearize a diode at 0.65 V.

::: solution
1. **Diode current.**
   $$\begin{aligned} I_d &= 10^{-14}(e^{0.65/0.02585} - 1) \\ &= 0.832\ \text{mA} \end{aligned}$$
2. **Its conductance.**
   $$\begin{aligned} g_d &= I_d/nV_T \\ &\approx 32.2\ \text{mS} \end{aligned}$$
   a 31 Ω resistor.
3. **The equivalent source.**
   $$\begin{aligned} I_{eq} &= 0.832 - 32.2 \times 0.65 \\ &= -20.1\ \text{mA} \end{aligned}$$
4. **The linear model.** In the next linear solve the diode is a 31 Ω resistor in parallel with a −20.1 mA source.

**Answer:** a 32.2 mS conductance (31 Ω) in parallel with a −20.1 mA source.
:::
:::

::: example
## Solve $x^2 + y^2 = 4$, $e^x + y = 1$ by Newton's method from (1, −1.7).

::: solution
1. **At the start.** $F = (-0.11, 0.0183)$, and the Jacobian is
   $$\begin{aligned} J &= \begin{pmatrix}2x & 2y\\ e^x & 1\end{pmatrix} \\ &= \begin{pmatrix}2 & -3.4\\ 2.718 & 1\end{pmatrix} \end{aligned}$$
2. **First step.** Solving $J\delta = -F$ gives $\delta = (0.00426, -0.0298)$, so the next point is (1.004256, −1.729850), where $\lVert F\rVert = 9 \times 10^{-4}$.
3. **Second step.** It reaches (1.004169, −1.729637) with $\lVert F\rVert = 5 \times 10^{-8}$.
4. **Third step.** It is exact to rounding. The residual squares each step, as Newton's method should once it's close.

**Answer:** $(x, y) = (1.004169, -1.729637)$, exact to rounding after three steps.
:::
:::

::: check
given: V = 0.6 | 0.65 | 0.7
answer: 1e-14/0.02585*exp(V/0.02585)*1000
unit: mS
tolerance: 0.5%

## What's the companion conductance $g_d$ of a diode ($I_s = 10^{-14}$ A, $nV_T$ = 25.85 mV) linearized at {V} V?

::: right
Right. $\frac{I_s}{nV_T}e^{V/nV_T}$ = {answer} mS.
:::

::: misses
- [1e-14*exp(V/0.02585)*1000] That's the current in mA; divide by $nV_T$ for the slope.
- [any] Not yet. $g_d = dI_d/dV$.
:::
:::

::: check
given: V = 0.6 | 0.65 | 0.7
answer: (1e-14*(exp(V/0.02585) - 1) - 1e-14/0.02585*exp(V/0.02585)*V)*1000
unit: mA
tolerance: 0.5%

## And the companion current source $I_{eq} = I_d - g_dV$ at {V} V?

::: right
Right. {answer} mA.
:::

::: misses
- [1e-14*(exp(V/0.02585) - 1)*1000] That's $I_d$ itself; subtract $g_dV$.
- [any] Not yet. $I_{eq} = I_d(V) - g_dV$.
:::
:::

::: check
given: x = 1 | 2; y = 1 | 3
answer: 2*x - 2*y*exp(x)
tolerance: 0.1%

## For $F = (x^2 + y^2 - 4,\; e^x + y - 1)$, what's the Jacobian's determinant at ({x}, {y})?

::: right
Right. $\det\begin{pmatrix}2x & 2y\\ e^x & 1\end{pmatrix} = 2x - 2ye^x$ = {answer}.
:::

::: misses
- [2*x + 2*y*exp(x)] Subtract the off-diagonal product.
- [any] Not yet. $J = \begin{pmatrix}2x & 2y\\ e^x & 1\end{pmatrix}$.
:::
:::

::: check
given: n = 10 | 1000 | 100000
answer: n + 1
tolerance: 0

## Forming a Jacobian of n = {n} equations by forward differences: how many evaluations of F does it take, counting F at the current point?

::: right
Right. One at the point and one per unknown: {answer}.
:::

::: misses
- [n] Don't forget F at the current point itself, which Newton needs anyway.
- [2*n + 1] Forward differences need one extra evaluation per unknown; central differences would need two.
- [any] Not yet. One perturbed evaluation per column.
:::
:::

::: check
given: a = 2 | 3 | 5; x0 = 1 | 2
answer: (x0 + a/x0)/2
tolerance: 0.01%

## Newton on $F = (x^2 - \given{a},\; y - x)$ from ({x0}, 0): what's $x_1$?

::: right
Right. The first equation alone decides x: {answer}.
:::

::: misses
- [any] Not yet. The Jacobian is $\begin{pmatrix}2x & 0\\ -1 & 1\end{pmatrix}$; the first row is ordinary Newton for $x^2 = a$.
:::
:::

::: check
kind: choice

## Newton's method on a circuit oscillates between two guesses and $\lVert F\rVert$ doesn't shrink. What's a standard remedy?

- [ ] Use a bigger step
- [x] Damp the step: halve Δ until $\lVert F\rVert$ decreases, or limit each junction's voltage change
- [ ] Switch to bisection on each node separately
- [ ] Recompute the Jacobian with smaller numbers

::: misses
- [1] Bigger steps make it worse.
- [3] Bisection doesn't extend to coupled equations that way.
- [4] Scaling the Jacobian doesn't change the step.
:::
:::

::: check
kind: parts
given: a = 2 | 5; b = 1 | 3; x = 2 | 1.5; y = 1 | 0.5

## Solve $F = (x^2 - \given{a},\; xy - \given{b}) = 0$ by Newton's method from $(\given{x}, \given{y})$.

::: part
answer: x - (x^2 - a)/(2*x)
tolerance: 0.5%

### What is the new x? (The first equation involves x alone.)

::: misses
- [any] $x - \frac{x^2 - a}{2x}$.
:::
:::

::: part
answer: y - (x*y - b + y*(-(x^2 - a)/(2*x)))/x
tolerance: 0.5%

### What is the new y? The second row of $J\delta = -F$ is $y\,\delta x + x\,\delta y = -(xy - b)$.

::: misses
- [b/x] That solves the second equation at the old x; Newton uses the linearization.
- [any] Use the δx from the first row.
:::
:::
:::

::: check
kind: derivation
vars: x = 1..2, y = -2..-1, m = 0.5..2, r = 1..3

## Newton's method on $F = (x^2 + y^2 - r^2,\; y - mx)$ at the point (x, y).

::: step
answer: 2*x + 2*m*y

### What is the Jacobian's determinant?
:::

::: step
answer: (-(x^2 + y^2 - r^2) + 2*y*(y - m*x))/(2*x + 2*m*y)

### What is the step δx, from $J\delta = -F$?
:::

::: right
Right. Cramer's rule on the 2 × 2 Jacobian; for bigger systems you'd factor J instead.
:::
:::

::: explain
## Why is each Newton step for a nonlinear circuit the same as solving a linear circuit?

::: model
Newton's method replaces every nonlinear equation by its tangent at the current guess. For a circuit, the nonlinear pieces are the device currents: a diode's exponential current, as a function of its voltage, is replaced by a straight line, which is the current of a conductance (the slope $g_d$) in parallel with a fixed current source (the line's intercept). Every device becomes a combination of resistors and sources, so the linearized KCL equations are exactly the nodal equations of a linear circuit. Solving that circuit gives the next guess; relinearizing there and repeating converges quadratically once close.
:::
:::

::: practice

::: check
given: V = 0.5 | 0.55 | 0.6 | 0.65 | 0.7 | 0.75
answer: 1e-14/0.02585*exp(V/0.02585)*1000
unit: mS
tolerance: 0.5%

## $g_d$ at {V} V?

::: misses
- [any] $\frac{I_s}{nV_T}e^{V/nV_T}$.
:::
:::

::: check
given: x = 0.5 | 1.5; y = 2 | 0.5
answer: 2*x - 2*y*exp(x)
tolerance: 0.1%

## Jacobian determinant at ({x}, {y})?

::: misses
- [any] $2x - 2ye^x$.
:::
:::

::: check
given: n = 10 | 50 | 100 | 500 | 1000 | 5000
answer: n + 1
tolerance: 0

## F evaluations for a forward-difference Jacobian, n = {n}?

::: misses
- [any] $n + 1$.
:::
:::
:::
