Lab

Phase Portrait Explorer

Visualize 2D dynamical systems with vector fields, trajectories, nullclines, and equilibrium classification.

Explore 2D dynamical systems

Pick a system preset, adjust parameters, and click on the phase plane to place trajectory starting points. Toggle vector fields, nullclines, and equilibrium markers to build intuition about system dynamics.

Select System

Display

Phase Plane

Click anywhere to place a trajectory starting point.

Equilibrium Points

Equilibria will appear here once a system is loaded.

Understanding Phase Portraits

What is a phase portrait?

A phase portrait shows how a 2D dynamical system evolves over time. Each point (x, y) in the plane has an associated velocity vector (dx/dt, dy/dt). Trajectories follow these vectors, revealing the system's long-term behavior: convergence, oscillation, or divergence.

Equilibrium classification

An equilibrium is a point where both dx/dt and dy/dt are zero. The Jacobian's eigenvalues determine stability: real negative = stable node, real positive = unstable node, opposite signs = saddle, complex with negative real part = stable spiral, positive = unstable spiral, purely imaginary = center.

Nullclines

The x-nullcline (green) is where dx/dt = 0, and the y-nullcline (orange) is where dy/dt = 0. Equilibria occur where nullclines intersect. Between nullclines, the trajectory direction is constrained, making them useful for sketching phase portraits by hand.

Limit cycles

Some nonlinear systems have closed trajectory loops called limit cycles. The Van der Pol oscillator demonstrates this: all nearby trajectories converge to a fixed periodic orbit, regardless of initial conditions.

Challenge 1: Find the limit cycle

Scenario: Select the Van der Pol system with μ = 1. Click near the origin and also far from the origin.

Observe: Trajectories from both inside and outside converge to the same closed orbit. This is a stable limit cycle.

Try increasing μ to see how the limit cycle shape changes.

Challenge 2: Stabilize the pendulum

Scenario: Select the Nonlinear Pendulum with b = 0. Click near the origin to see perpetual oscillation (center).

Task: Increase the damping b until the origin becomes a stable spiral. Watch trajectories spiral inward toward rest.

At b = 0 the equilibrium is a center; any positive damping turns it into a stable spiral.

Challenge 3: Classify all equilibria of the Duffing oscillator

Scenario: Select the Duffing system with δ = 0.3. The system has three equilibria at x = -1, 0, and 1.

Task: Check the equilibrium details panel. The origin should be a saddle, while x = ±1 are stable nodes or spirals depending on δ.

Place trajectories near each equilibrium to see the different behaviors.

Security model

Everything runs in your browser. No data is sent to any server. All dynamical system computations (RK4 integration, eigenvalue classification, nullcline computation) run entirely in JavaScript on your device.