Math Methods · interactive

Phase Portraits & Direction Fields

A differential equation doesn't just have an answer — it has a flow. Every point in the plane gets an arrow saying which way the system moves next, and solutions are just paths that follow the arrows. Click anywhere to drop a trajectory, tune the system, and watch fixed points turn from stable whirlpools into saddles and explosions.

ẋ = a·x + b·y  ·  ẏ = c·x + d·y
A 2-D linear system. The eigenvalues of the matrix [[a,b],[c,d]] decide everything — whether trajectories spiral in, fly out, or split at a saddle.

Phase plane · click to drop a trajectory

Click or drag on the plane to release trajectories from that point. They flow forward (solid) and backward (faded) in time.

Eigenvalues
Fixed point type

System matrix

[
a
b
c
d
]

Linear presets

Nonlinear classics

Nonlinear systems can have limit cycles & multiple fixed points — the matrix sliders don't apply.

Reading the arrows

At every point, the system tells you a velocity vector (ẋ, ẏ). Draw a little arrow for each and you get the direction field. A solution curve is simply a path that's tangent to those arrows everywhere — so you can trace the qualitative behaviour of any initial condition just by following the flow, without ever solving a formula. Click around the plane and watch where different starts end up.

Eigenvalues are destiny

For a linear system, the long-term fate of every trajectory is written in the matrix's eigenvalues λ. Real and opposite signs → a saddle: trajectories rush in along one direction and shoot out along another. Both negative → a stable node, everything decays to the origin. Complex with negative real part → a stable spiral, the hallmark of a damped oscillator (your spring–mass–damper lives here). Purely imaginary → a center, endless closed loops — an undamped oscillator conserving energy forever. Nudge the matrix entries and watch the classification flip in real time.

When it goes nonlinear

Real systems aren't linear, and that's where the richness is. The pendulum has a center (gentle swinging) and saddles (balanced upright) with separatrices dividing swinging from spinning. The Van der Pol oscillator pulls every trajectory onto a single limit cycle — a self-sustained rhythm, the math behind heartbeats and electronic oscillators. Predator–prey orbits in closed loops of boom and bust. Near any fixed point, though, you can linearize — and the eigenvalue rules above come right back.

EngineeringCandy · RK4-integrated trajectories on a live direction field · click it, tune it, learn