Learning Objectives
By the end of this section you will be able to:
- Find every fixed point of a 2-D nonlinear system by solving .
- Compute the Jacobian matrix analytically and verify it numerically.
- Classify each fixed point as saddle, node, spiral, or center using the trace, determinant, and discriminant of .
- State and apply the Hartman–Grobman theorem — the rule that says, for hyperbolic fixed points, the nonlinear flow looks topologically like the linearized flow.
- Identify the failure case (centers, zero eigenvalues) and know that you need a finer tool there.
- Implement the whole pipeline — fixed-point search, Jacobian, classification — first in NumPy with finite differences, then in PyTorch with exact autograd.
Why Linearize?
“The equations of physics are almost never linear. So why does almost every textbook chapter solve linear systems?”
Because near every interesting point, every smooth nonlinear system looks linear. Zoom in close enough on the orbit of a comet, the swing of a pendulum, the population of a forest, the voltage in a Hodgkin–Huxley neuron, and you will always see the same family of linear pictures we already mastered in sections 23.02–23.06: stable spirals, unstable nodes, saddles, centers.
Linearization is the bridge. It says: solve the linear problem once, then transplant the answer to every fixed point of every smooth nonlinear system in nature. That is the entire content of this section.
🪐 Mechanics
- Pendulum (this section)
- Three-body equilibrium points (Lagrange)
- Aircraft trim states
🌿 Biology & ecology
- Predator–prey equilibria (§ 23.08)
- Gene-regulatory toggle switches
- Neuron rest potentials
🎛 Control & AI
- Robotic balance points
- Reinforcement-learning policies near fixed strategies
- Optimizer stability around minima
The Idea: A Microscope at Each Fixed Point
Picture the flow of a 2-D nonlinear system as a wind field swirling across the plane. At a fixed point the wind dies — air is perfectly still. Drop a leaf at that point, it stays. Drop a leaf slightly off the point, and it drifts. Which way?
Zoom your microscope into a tiny disk around . Set (the deviation). A first-order Taylor expansion of around says
Drop the higher-order term and the flow collapses to a linear system:
Three sentences, three actions
- Find every with .
- Compute (the matrix of partial derivatives of ).
- Classify the linear system using its eigenvalues — saddle, spiral, node, or center.
Repeat at every fixed point. Glue all the local pictures together and you have the global phase portrait of a nonlinear system.
Step 1 — Finding Fixed Points
A fixed point (a.k.a. equilibrium, critical point, rest point) is any satisfying
In two dimensions this is a system of two equations in two unknowns. Methods:
| Method | When to use | How |
|---|---|---|
| By inspection | Polynomial / trig terms factor easily | Set each component of F to zero and solve in your head. |
| Substitution / elimination | Algebraic systems | Solve one equation for one variable, substitute into the other. |
| Newton's method | Black-box / no closed form | Iterate xₙ₊₁ = xₙ − J⁻¹ F(xₙ) from several seeds. |
| Numerical root finder | Production code | scipy.optimize.fsolve, root_scalar, or homotopy continuation. |
For the damped pendulum : forces , then with gives , so . The pendulum has infinitely many fixed points — but physically only two are distinct: (hanging straight down) and (balanced straight up).
Step 2 — The Jacobian Matrix
Write the system in components . The Jacobian at a point is the 2×2 matrix
It is the multivariable generalization of the ordinary derivative . Its columns tell you what happens to the unit vectors under ; equivalently, its action on any tiny displacement is the best linear approximation to .
Pendulum example
With and the partials are
So the Jacobian is
Notice depends only on (and the constant ). Evaluated at the two physical fixed points:
The sign of the off-diagonal entry flips because . That single sign change causes the entire qualitative difference between “pendulum hanging down” and “pendulum balanced up”.
Step 3 — The Linearization Theorem
Once we have , the small deviation satisfies the linear system
Hartman–Grobman theorem (informal)
If every eigenvalue of has nonzero real part (the fixed point is called hyperbolic), then there is a continuous, invertible change of coordinates near that maps the nonlinear orbits onto the linear orbits of . The two flows look the same up to a smooth deformation.
In plain English: the linearization tells the truth about every hyperbolic fixed point. The only loophole is when some eigenvalue has zero real part — pure imaginary (a center) or exactly zero (a degenerate direction). In those cases the missing higher-order terms decide the actual behavior.
Why this is so powerful
We do not need to solve the nonlinear system to know its local geometry. Two partial derivatives and two eigenvalues per fixed point are enough to predict whether the system will settle, oscillate, blow up, or do a quarter-cycle saddle pass. The pendulum's entire qualitative story comes from four numbers: (the off-diagonal entry at each fixed point) and the damping .
Classifying Fixed Points by Trace and Determinant
For a 2×2 matrix with trace and determinant , the characteristic polynomial is
so the eigenvalues are
Three numbers — — completely determine the fixed-point type. The full chart:
| Sign of Δ | Sign of τ²−4Δ | Sign of τ | Eigenvalues | Type |
|---|---|---|---|---|
| Δ < 0 | — (always > 0) | — | Real, opposite signs | Saddle (always unstable) |
| Δ > 0 | > 0 | τ < 0 | Real, both negative | Stable node |
| Δ > 0 | > 0 | τ > 0 | Real, both positive | Unstable node |
| Δ > 0 | < 0 | τ < 0 | Complex, Re < 0 | Stable spiral |
| Δ > 0 | < 0 | τ > 0 | Complex, Re > 0 | Unstable spiral |
| Δ > 0 | < 0 | τ = 0 | Pure imaginary | Center (non-hyperbolic) |
| Δ > 0 | = 0 | — | Real, repeated | Degenerate / star node |
| Δ = 0 | — | — | One zero eigenvalue | Non-isolated / non-hyperbolic |
The trace-determinant plane
Plot every 2×2 matrix as a point in the plane. The parabola separates real from complex eigenvalues; the horizontal line separates saddles from nodes/spirals; the vertical line separates stable from unstable. Every region of the plane corresponds to one fixed-point type. The linear explorer below lets you wander that plane with sliders.
Interactive: Linear Phase-Plane Classifier
Before we attack the nonlinear pendulum, build muscle memory for what each linear type LOOKS like. Drag the four sliders to change the entries of ; the panel on the right shows which region of the trace-determinant plane you have landed in. Try the preset buttons — saddle, stable spiral, center — and notice how the field flips between in/out, rotation, decay.
The Damped Pendulum, End to End
Now put the three steps together on the model nonlinear system of this section. Take the damped pendulum
Fixed points
From : . From : . Physical solutions (mod ):
Jacobian
Linearization at the “down” fixed point
Trace , determinant , discriminant . Eigenvalues:
Complex pair, negative real part ⇒ stable spiral. The pendulum, released from any small angle, will oscillate while losing amplitude. Period of one oscillation: time units (matches the period we know from the small-angle approximation).
Linearization at the “up” fixed point
Trace , determinant . Δ negative is the signature of a saddle — no further work needed. Eigenvalues:
One positive eigenvalue (unstable direction) and one negative eigenvalue (stable direction). The unstable manifold direction is the eigenvector for : . The stable manifold direction: . These are the two dashed lines you will see in the interactive picture below.
Glue the two local pictures together: orbits spiral into the down position, except those landing on the stable manifold of the up position, which slide in along ; any orbit slightly off the stable manifold gets ejected along and eventually spirals into the next down position one full revolution away. That entire global story comes from two 2×2 matrices.
Interactive: Pendulum vs Its Linearization
Below: the full nonlinear pendulum field as faint blue arrows; the Jacobian linearization around the highlighted fixed point as bright amber arrows inside a dashed circle. Click anywhere to drop a starting state. The solid bright curve is the TRUE pendulum trajectory; the dashed curve is what the LINEARIZATION predicts from the same starting state. Near the chosen fixed point the two are indistinguishable. Far away — especially across — they diverge dramatically.
Things to try
- With the default and the origin selected, click on . The solid & dashed curves sit on top of each other — the small-angle approximation IS the linearization.
- Now click on (a large angle far from the origin). The linear prediction spirals inward as usual; the true trajectory swings over the top of the pendulum and keeps going. The linearization broke down.
- Switch to the saddle at . Click points near on each side of the dashed violet (stable) line — orbits jump apart along the amber (unstable) line. That is the saddle separatrix at work.
- Slide to . The origin becomes a CENTER. The linearization predicts perfect ellipses, but the true pendulum's orbits are slightly deformed by the missing higher-order terms — Hartman–Grobman is silent at centers, and it shows.
Worked Example (Step-by-Step)
Let's do every step by hand, exactly as the computer would, for the system in the simulator ().
Click to expand the full hand calculation
Step 2 — Solve F = 0 for fixed points
. Substitute into : . So for any integer . Two physically distinct fixed points: (down) and (up).
Step 4 — Evaluate at the “down” fixed point (0, 0)
, , ⇒ complex eigenvalues, negative real part ⇒ stable spiral.
. Period of oscillation s. Decay envelope — amplitude drops to after one swing.
Step 5 — Evaluate at the “up” fixed point (π, 0)
. Δ negative is the saddle signature — we already know the answer. For the record: , , so
Saddle. Unstable direction grows like ; stable direction decays like . Time to double in the unstable direction: s.
Step 6 — Eigenvectors of the saddle (the manifolds)
For : solve :
Pick ; normalize to . Same procedure for gives the orthogonal-looking pair . These are the two dashed lines emanating from the saddle in the interactive plot.
Step 7 — Glue the two pictures into a global phase portrait
Almost every orbit ends up in one of the basins of attraction of . The boundary between consecutive basins is the stable manifold of the saddle . Tip the pendulum just past one of those saddles and it tumbles into the NEXT basin — a literal “separatrix”.
Computation in Python
Two helpers do all the work: a numerical Jacobian by central differences, and a classifier that reads three numbers off any 2×2 matrix. We loop over the three fixed points of the pendulum and print a one-line verdict for each.
Expected output:
fp = (+0.0000, +0.0000) -> stable spiral J = [[0.0, 1.0], [-1.0, -0.3]] eigenvalues = [-0.15+0.9887j -0.15-0.9887j] fp = (+3.1416, +0.0000) -> saddle J = [[0.0, 1.0], [1.0, -0.3]] eigenvalues = [ 0.8612 -1.1612] fp = (-3.1416, +0.0000) -> saddle J = [[0.0, 1.0], [1.0, -0.3]] eigenvalues = [ 0.8612 -1.1612]
PyTorch: Autograd Jacobian and Stability
Finite differences are great for sanity-checking, but they introduce truncation error and require N+1 function evaluations per Jacobian column. PyTorch's gives the exact Jacobian with a single backward pass — and, crucially, it keeps every quantity inside a differentiable graph. That means we can later optimize stability itself: pick the damping that puts the pendulum's eigenvalues exactly where we want them.
Expected output:
fp = (+0.0000, +0.0000) -> stable spiral
J =
tensor([[ 0.0000, 1.0000],
[-1.0000, -0.3000]])
eigenvalues = tensor([-0.1500+0.9887j, -0.1500-0.9887j])
fp = (+3.1416, +0.0000) -> saddle
J =
tensor([[ 0.0000, 1.0000],
[ 1.0000, -0.3000]])
eigenvalues = tensor([ 0.8612+0.j, -1.1612+0.j])Why bother with PyTorch when NumPy already works?
For this 2-D toy example, NumPy is just as fast and clearer. PyTorch earns its keep the moment you want to differentiate through the stability analysis — for example, tune the damping so that the dominant eigenvalue has a target real part: . With autograd, that's a 5-line gradient-descent loop because flows for free. The same trick underlies modern data-driven control, neural-ODE stabilization, and physics-informed learning.
When Linearization Fails — The Center Case
Hartman–Grobman only protects hyperbolic fixed points (every eigenvalue has nonzero real part). The undamped pendulum at the origin has Jacobian
with eigenvalues — pure imaginary. Linearization predicts a center (perfect circular orbits around the origin). What does the true nonlinear pendulum do? It conserves the energy , and the level curves of are not circles — they bulge as approaches and connect through the two saddle points to form the famous pendulum separatrix. So the linearization is qualitatively right (closed orbits) but quantitatively wrong (shape), and it cannot say anything at all about the global heteroclinic loop.
Switch on a tiny and the eigenvalues instantly pick up a small negative real part — the center becomes a very-slowly decaying spiral. Hartman–Grobman is restored, but the warning stands: at the boundary, higher-order terms decide. Tools you meet later — Lyapunov functions, normal forms, center-manifold theory — exist precisely to plug this gap.
Three borderline cases to remember
- (center): higher-order terms decide. Could be stable, unstable, or a tiny limit cycle.
- (zero eigenvalue): a whole line of equilibria, not an isolated point. Classification table doesn't apply.
- Repeated eigenvalue with only one eigenvector: degenerate node / improper node. Use generalized eigenvectors.
Where Linearization Shows Up
| Field | System | Linearization tells you… |
|---|---|---|
| Mechanics | Lagrange L4/L5 points | Trojan asteroids are stable spirals (in the rotating frame). |
| Ecology | Lotka–Volterra near coexistence | Center predicts the famous predator–prey cycle. |
| Neuroscience | FitzHugh–Nagumo rest state | Hopf bifurcation: spiral changes stability ⇒ tonic firing onset. |
| Chemistry | Brusselator near steady state | Saddle-node bifurcation gives bistability of chemical states. |
| Control | Quadcopter hover | Linearize → LQR controller designed in 5 minutes vs months for the full model. |
| Machine learning | Gradient flow near a minimum | Jacobian = Hessian of loss; spectrum predicts convergence rate. |
| Climate | Stommel two-box ocean model | Saddle node ⇒ abrupt thermohaline-circulation shutdown. |
Every entry is the same three steps: write , find , eigenvalue-classify . The same 2×2 characteristic polynomial decides whether a quadcopter hovers, a forest persists, or an ice age begins.
Common Pitfalls
Confusing 'fixed point' with 'equilibrium of the homogeneous problem'
For a non-autonomous system the time variable wrecks the “set F to zero” trick. Linearization in that setting requires a known particular solution to expand around, then a time-varying Jacobian. Don't pretend an explicitly time-dependent system has fixed points just because the autonomous version did.
Forgetting to translate to the deviation u = x − x*
The linearization is in deviation coordinates centered on . A common bug is to plot the linear flow on the ORIGINAL plane as if the fixed point were at the origin — getting a picture that's correct in shape but offset. Always shift back: .
Trusting linearization at a center
Pure imaginary eigenvalues mean the linear system has closed orbits. The nonlinear system might have a stable spiral, an unstable spiral, OR closed orbits — only the higher-order terms know. Reach for Lyapunov functions, energy methods, or numerical simulation, not Hartman–Grobman.
Mixing up trace, determinant, discriminant signs
Memorize the two critical signs: (irrespective of ), and (spiral or center). The rest is just whether is positive or negative.
Summary
| Concept | Formula | Meaning |
|---|---|---|
| Fixed point | F(x*) = 0 | Point where the flow is zero. Everything starts here. |
| Jacobian | J_{ij} = ∂F_i / ∂x_j | Best linear approximation of F near a point. |
| Linearized system | u' = J(x*) u with u = x - x* | What the dynamics look like in a microscope at x*. |
| Hartman–Grobman | Re λ ≠ 0 for every eigenvalue | Nonlinear ≈ linear (topologically) near a hyperbolic fixed point. |
| τ, Δ, τ²−4Δ | trace, det, discriminant | Three numbers classify every 2-D linear fixed point. |
| Δ < 0 | — | Saddle (always unstable, always one-in-one-out). |
| Δ > 0, τ²−4Δ < 0 | complex eigenvalues | Spiral if τ ≠ 0; center if τ = 0. |
| Δ > 0, τ²−4Δ > 0 | real eigenvalues | Node, stable if τ < 0, unstable if τ > 0. |
| Failure case | Re λ = 0 for some eigenvalue | Higher-order terms decide — Hartman–Grobman silent. |
The one-line takeaway
Solve to find every fixed point; compute ; read the topological type off the trace, determinant, and discriminant of the resulting 2×2 matrix. Do this at every equilibrium and you have mapped the local geometry of an arbitrary nonlinear system — from a pendulum, to a predator–prey ecosystem, to the rest state of a neuron — using nothing more than two partial derivatives and one quadratic equation.