ODE Phase Plane Analysis Back
Dynamical Systems

Ordinary Differential Equations — Phase Plane Analysis Tool

Real-time visualization of direction fields, nullclines, RK4 phase trajectories, and Jacobian stability analysis. Includes pendulum, predator-prey, Van der Pol, and other major models.

System Selection
dx/dt = y
dy/dt = −sin(x) − 0.5y
Parameters
Damping coefficient b
Parameter 2
Initial Condition (x₀, y₀)
x₀ =
y₀ =
View Range ±R
Equilibrium Information
Results
Equilibrium Count
Eigenvalue λ₁
Stability
Trajectory Type
Phase Plane (Direction Field · Trajectories · Nullclines)
Phase
Time

Stability Classification (Jacobian Eigenvalues)

Linearization at equilibrium $(x^*, y^*)$: $J = \begin{pmatrix}\partial f/\partial x & \partial f/\partial y \\ \partial g/\partial x & \partial g/\partial y\end{pmatrix}$

$\text{tr}(J) < 0,\ \det(J) > 0 \Rightarrow$ Stable | $\det(J) < 0 \Rightarrow$ Saddle

RK4:$k_1=hf(t_n,y_n),\ k_2=hf(t_n+h/2,y_n+k_1/2),\ldots$

What is Phase Plane Analysis?

🙋
What exactly is a "phase plane"? I've seen the vector field and trajectories in the simulator, but I'm not sure what I'm looking at.
🎓
Basically, it's a special graph for a system of two first-order ODEs. Instead of plotting position vs. time, we plot one variable against the other. For the pendulum model here, that's angular velocity ($\dot{\theta}$) vs. angle ($\theta$). Each point on the plane represents a complete state of the system. The vectors show you which direction and how fast that state will change. Try clicking on the plane to launch a trajectory—you're watching a single initial condition evolve through state space!
🙋
Wait, really? So those wavy lines are not a time graph? And what are the red and blue dashed lines (the nullclines)?
🎓
Right, the wavy trajectory shows how angle and velocity trade off over time, all in one plot. The nullclines are super useful. They are lines where one derivative is zero. On the blue line, $\dot{\theta}=0$, meaning the angular velocity isn't changing. On the red line, $\ddot{\theta}=0$, meaning the acceleration is zero. Where they cross, both derivatives are zero—that's an equilibrium point! In the simulator, drag the "Damping coefficient b" slider to zero. See how the nullclines shift and the equilibrium point's stability changes?
🙋
That makes sense! So how do we know if an equilibrium is stable, like a pendulum at rest, or unstable, like balancing it upright?
🎓
Great question. We analyze the system linearized around that point. The key is the Jacobian matrix—it's like the multi-variable derivative. Its eigenvalues tell the story. If both have negative real parts, it's a stable attractor (spirals in). If one is positive, it's unstable (trajectories repel). Try the predator-prey model. The equilibrium at the center is a "center" (pure imaginary eigenvalues), causing closed orbits. Now add a tiny damping via parameter 2—watch it become a stable spiral.

Physical Model & Key Equations

The simulator solves a general system of two autonomous first-order ODEs. The state is defined by variables $x$ and $y$, and their rates of change are given by functions $f$ and $g$.

$$ \begin{align*}\dot{x}&= f(x, y) \\ \dot{y}&= g(x, y) \end{align*}$$

For the damped pendulum example: $x = \theta$ (angle), $y = \dot{\theta}$ (angular velocity). Then $f(x,y) = y$ and $g(x,y) = -\sin(x) - b\,y$, where $b$ is the Damping coefficient you control with the slider.

To classify the stability of an equilibrium point $(x^*, y^*)$ where $f(x^*,y^*)=0$ and $g(x^*,y^*)=0$, we compute the Jacobian matrix $J$ and its eigenvalues $\lambda$.

$$ J = \begin{pmatrix}\frac{\partial f}{\partial x}& \frac{\partial f}{\partial y}\\ \frac{\partial g}{\partial x}& \frac{\partial g}{\partial y}\end{pmatrix}_{(x^*, y^*)}, \quad \lambda_{1,2}= \frac{\text{tr}(J) \pm \sqrt{\text{tr}(J)^2 - 4\det(J)}}{2}$$

The eigenvalues' real parts determine stability: if both are negative, the point is a stable node or spiral; if one is positive, it's unstable; if they are pure imaginary, it's a center (neutrally stable). Changing parameters like damping $b$ directly alters the trace $\text{tr}(J)$, thus changing the stability.

Frequently Asked Questions

You can set them by clicking on the (x, y) plane on the screen or by directly entering numerical values into the input fields. The clicked point becomes the initial state, from which the trajectory is calculated and drawn using the RK4 method. It is also possible to specify multiple initial conditions for comparison.
Nullclines are curves where dx/dt = 0 or dy/dt = 0. Their intersections are equilibrium points (fixed points). By visualizing nullclines, you can intuitively grasp the flow direction of the system and the locations of equilibrium points, which is important as a preliminary step for stability analysis.
The eigenvalues of the Jacobian matrix at the equilibrium point are calculated, and stability is determined by the sign of the real parts. If both real parts are negative, the point is stable (attractor); if positive, unstable (repeller); if they have opposite signs, it is a saddle point. If there are imaginary parts, the behavior involves spiraling toward or away from the point.
Yes, in custom mode you can freely define f(x, y) and g(x, y). The expressions support common operators (+, -, *, /, ^) and functions (sin, cos, exp, log, etc.). Parameters can also be adjusted with sliders, allowing you to explore various nonlinear systems.

Real-World Applications

Nonlinear Structural Vibration (CAE): Engineers use phase plane analysis to study the stability of structures under dynamic loads, like a swaying bridge or building in an earthquake. By modeling the system as a nonlinear oscillator (similar to the pendulum here), they can identify dangerous amplitude thresholds and design damping systems to keep the response within a stable region.

Control Systems & Limit Cycle Detection: In robotics and aerospace, control systems are designed to stabilize unstable equilibria (like a balancing robot). The phase plane reveals limit cycles—isolated closed orbits that represent sustained oscillations. Engineers adjust controller gains (parameters in the simulator) to eliminate unwanted limit cycles or create desired stable ones.

Epidemiological Modeling: The classic SIR (Susceptible-Infected-Recovered) model for disease spread can be reduced to a 2D system. The phase plane shows how small changes in the transmission rate (a model parameter) can shift the equilibrium from disease-free (stable) to an endemic state, helping public health officials plan interventions.

Chemical Reaction Networks: In a continuously stirred tank reactor, the concentrations of two key reactants can be modeled with coupled ODEs. Phase plane analysis identifies stable operating points (high yield) and avoids unstable ones that could lead to runaway reactions or quenching, which is critical for safe and efficient chemical plant design.

Common Misconceptions and Points to Note

First, understand that "a phase plane is not merely a plot of trajectories." A trajectory is a single line starting from an initial condition, but the true value of phase plane analysis lies in observing the entire direction field (arrows) to grasp the overall 'flow.' It is risky to look at just one trajectory and hastily conclude, "This system oscillates." For example, even in damped oscillation, the motion may appear complex if the initial energy is high, but by observing the entire direction field, you can see how all arrows are eventually drawn into a single point (a stable equilibrium).

Next, consider the "scale" of parameter settings. For instance, in a "pendulum" model, changing the damping coefficient `b` from 0.1 to 1.0 dramatically alters the behavior. However, if the display range `R` remains at the default ±5, the arrows may become densely packed around the equilibrium, obscuring the flow. The key is to use the "Display Range ±R" slider to widen or narrow your view when you change parameters. In practice, proper scaling is essential.

Finally, beware of the pitfall that "real-time simulation is not a panacea." This tool draws trajectories using numerical computation. For highly sensitive systems (e.g., near the unstable manifold of a saddle point), even a tiny numerical error can send the trajectory in a completely different direction. Do not blindly trust simulation results; cultivate the habit of always cross-checking them with theory—asking, "Is this result truly reliable?" and comparing it with theoretical expectations (the shape of nullclines, predictions from linearization of equilibrium points).