b2KIT

Phase Portrait Plotter

Plot phase portraits for 2D autonomous systems. Classify equilibria as nodes, spirals, saddles, and centers with trajectory animation.

Tested tool guide Tested browser tools Checked August 16, 2026

What Phase Portrait Plotter does, with a checked example

Type the two right-hand sides of a 2D autonomous system - dx/dt = f(x, y), dy/dt = g(x, y) - and this tool draws the phase portrait: a vector field of arrows, the equilibrium points where both f and g vanish, and animated trajectories from starting points you choose. Each equilibrium is classified from the eigenvalues of the Jacobian matrix of partial derivatives: node, spiral, saddle, or center, stable or unstable. The usual surprise is that the label is local and linear - it describes behavior only arbitrarily close to the equilibrium - and a 'center' label does not guarantee closed orbits once nonlinear terms are present.

Worked example

A concrete input and expected output from the current implementation.

Input

dx/dt = y
dy/dt = -x

Expected output

One equilibrium at (0, 0), classified as a center (Jacobian eigenvalues +i and -i, purely imaginary). Trajectories are the closed circles x^2 + y^2 = r^2, traversed counterclockwise, so nearby orbits neither approach nor escape the origin.

With x' = y and y' = -x, the squared distance from the origin has zero derivative, so every trajectory stays on a circle. Purely imaginary eigenvalues are exactly the signature the tool uses for the center label.

How the result is produced

1

Equilibrium finding and linearization

The tool locates the points where both right-hand sides vanish simultaneously, then evaluates the four partial derivatives of f and g at each one - the Jacobian matrix. Its two eigenvalues decide the label: both real and negative, a stable node; opposite signs, a saddle; complex with negative real part, a stable spiral; purely imaginary, a center.

2

Vector field, trajectories, and animation

At grid points it draws an arrow in the direction (f, g), the velocity of a solution passing through that point, so the field shows the flow at a glance. Picking a starting point numerically integrates the equations and traces the orbit forward and backward in time; the animation moves a marker along the trace, and arrow length conveys how fast the flow runs.

Good uses

  • Predict the fate of a two-species model such as Lotka-Volterra predation: enter the equations and watch whether trajectories close into periodic orbits around the coexistence equilibrium or spiral toward or away from it.
  • Test a hypothesis about local stability before doing the algebra: for a pendulum or competing-species system, start trajectories near each equilibrium and see which ones approach it, which spiral away, and where the basin boundary lies.
  • Demonstrate how a parameter shifts the classification: enter x' = y, y' = -x - c*y and increase c from 0, watching the equilibrium change from a center into a stable spiral, then into a stable node once c exceeds 2.

Limits and checks

  • The label is local, the portrait is global. Classification comes from the Jacobian at one point; away from it, nonlinear terms dominate, and where trajectories actually go - which equilibrium wins a basin, whether a separatrix loops back - is decided by the full equations, not by the label.
  • Centers are the fragile case. Purely imaginary eigenvalues make the linearization inconclusive: generic nonlinear terms turn closed circles into slow spirals, so a 'center' reading is reliable for systems with a conserved quantity, like x' = y, y' = -x, and uncertain for others.
  • Judge by the label, not the animation. A stable node and a stable spiral both converge, and a short clip may not reveal which; meanwhile long numerical integration makes a genuine center drift into a slow apparent spiral. The eigenvalue readout printed for each equilibrium is the reliable result.

Common questions

Why does the plot show arrows but no equilibria?

Some systems genuinely have no rest points. An equilibrium requires both right-hand sides to vanish at the same point, and for x' = x, y' = 1 the second equation is never zero, so no such point exists. The flow never settles, and the arrows are the whole picture rather than a mistake in the tool.

It labels the point a stable node, but a trajectory I clicked seems to leave. Did I enter it wrong?

Probably not. Stability describes behavior arbitrarily close to the equilibrium; a trajectory started farther away can wander through other regions first, or leave the plotting window before its slow exponential approach becomes visible. Zoom in near the equilibrium and restart close to it, and the predicted convergence should appear.

References and verification

The example and behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools