Plot trajectories, inspect equilibria, and explore two-variable system behavior. Tune parameters, time steps, and starts. Generate clear phase portraits, statistics, tables, and exports instantly.
Choose a dynamical system, enter initial conditions, set the integration range, and generate the phase portrait using a fourth-order Runge–Kutta solver.
System: dx/dt = v, dv/dt = -(c/m)v - (k/m)x
Numerical method: The calculator solves the selected two-state system using the classical fourth-order Runge–Kutta method.
RK4 update: sn+1 = sn + (Δt/6)(k₁ + 2k₂ + 2k₃ + k₄)
Where: k₁ = f(t, s), k₂ = f(t + Δt/2, s + Δt k₁/2), k₃ = f(t + Δt/2, s + Δt k₂/2), and k₄ = f(t + Δt, s + Δt k₃).
The phase portrait is then plotted as state 2 against state 1, revealing spirals, loops, closed orbits, attractors, and equilibrium behavior.
Example values below illustrate a damped oscillator trajectory with x(0)=1, v(0)=0, m=1, k=1, c=0.2, t from 0 to 1 with Δt=0.2.
| Time | Position x | Velocity v |
|---|---|---|
| 0.0 | 1.0000 | 0.0000 |
| 0.2 | 0.9802 | -0.1960 |
| 0.4 | 0.9239 | -0.3767 |
| 0.6 | 0.8343 | -0.5356 |
| 0.8 | 0.7160 | -0.6674 |
| 1.0 | 0.5745 | -0.7682 |
A phase space plot shows how one state variable changes relative to another. It helps reveal closed orbits, damping, divergence, attractors, and equilibrium behavior more clearly than a standard time-series chart.
Spirals often appear when damping or instability is present. An inward spiral usually indicates decay toward equilibrium, while an outward spiral can indicate growth away from equilibrium or unstable parameter choices.
The time step controls numerical resolution. Smaller steps improve accuracy but increase computation. Larger steps run faster, yet they can distort the trajectory or make nonlinear systems numerically unstable.
The calculator includes simple harmonic, damped, driven damped, Van der Pol, simple pendulum, and Lotka–Volterra systems. These cover common linear, nonlinear, mechanical, and biological phase portraits.
The behavior hint compares the starting and ending distance from a reference equilibrium. It offers a quick interpretation, but it is not a formal proof of stability for every nonlinear system.
Yes. Choose the Lotka–Volterra model and enter positive prey and predator values. The plot can show cyclic population exchange and how trajectories move around the coexistence equilibrium.
Early stopping occurs when the numerical solution becomes unstable or extremely large. Reduce the time step, shorten the interval, or use gentler parameters to keep the simulation within a stable range.
The CSV file contains the computed trajectory table with time and state values. The PDF report includes summary metrics and a snapshot of the generated phase portrait.
Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.