Math Methods · Learn

Phase Portraits & Direction Fields

A differential equation doesn't just have an answer — it has a flow. Every point gets an arrow saying where the system goes next, and the eigenvalues at a fixed point decide whether nearby trajectories spiral in, fly out, or split.

▶ Play the lab📖 Learn the theory

1The flow picture

For a planar system $\dot x = f(x,y),\ \dot y = g(x,y)$, attach the velocity vector $(\dot x,\dot y)$ to every point — that's the direction field. A solution is just a curve tangent to the arrows everywhere, so you can read off the qualitative fate of any starting point without a formula.

2Linear systems & eigenvalues

Near a fixed point, a linear system $\dot{\mathbf{x}} = A\mathbf{x}$ governs the behaviour, and the eigenvalues $\lambda$ of $A$ tell the whole story. With trace $T$ and determinant $D$, $\lambda = \tfrac{T\pm\sqrt{T^2-4D}}{2}$:

EigenvaluesTypeBehaviour
real, opposite signssaddlein one way, out another (unstable)
real, same signnodeall in (stable) or all out (unstable)
complex, Re ≠ 0spiralspiral in (Re<0) or out (Re>0)
pure imaginarycenterclosed orbits, neutrally stable

3Stability

The rule is simple: a fixed point is stable when every eigenvalue has negative real part. A damped oscillator is a stable spiral; an undamped one (energy conserved) is a center; an inverted pendulum balanced upright is a saddle.

4Going nonlinear

Real systems are nonlinear, and that's where the richness lives. Near each fixed point you can linearize (use the Jacobian) and the eigenvalue rules return. But nonlinear systems also do things linear ones can't: the Van der Pol oscillator pulls every trajectory onto a single self-sustained limit cycle; the pendulum has centers and saddles joined by a separatrix dividing swinging from spinning.

▶ In the lab

Edit the matrix and watch the classification flip live; click to drop trajectories; switch to the nonlinear presets to see a limit cycle form. Open the lab →

Key takeaways

📄 Further reading

Bjorn Poonen's free MIT 18.03 lecture notes (PDF) cover graphical methods in §31, autonomous equations in §32, and autonomous systems & phase portraits in §33. §37, "How Google search uses an eigenvector," is a fun bonus once you've seen eigenvalues classify a fixed point here — PageRank is the same idea applied to a 4-billion-page matrix.

EngineeringCandy · Learn · the theory behind the playground