Phase Space Plotter Calculator

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.

Calculator Inputs

Choose a dynamical system, enter initial conditions, set the integration range, and generate the phase portrait using a fourth-order Runge–Kutta solver.

Use position and velocity for damped mechanical motion.
Higher values draw smoother phase portraits.

Formula Used

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.

How to Use This Calculator

  1. Select a model that matches your dynamical system.
  2. Enter the initial values for the two state variables.
  3. Set the start time, end time, and time step.
  4. Provide model parameters such as damping, stiffness, forcing, or population rates.
  5. Click Generate Phase Space Plot to compute the trajectory.
  6. Review the summary cards, sample table, and phase portrait.
  7. Use the export buttons to download the computed data as CSV or save the report as PDF.

Example Data Table

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.01.00000.0000
0.20.9802-0.1960
0.40.9239-0.3767
0.60.8343-0.5356
0.80.7160-0.6674
1.00.5745-0.7682

Frequently Asked Questions

1. What does a phase space plot show?

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.

2. Why do I see spirals in the 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.

3. Why is the time step important?

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.

4. Which models are included?

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.

5. What does the behavior hint mean?

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.

6. Can I use this for predator–prey analysis?

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.

7. Why did the solver stop early?

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.

8. What do the CSV and PDF downloads contain?

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.

Related Calculators

bifurcation diagram calculatorjulia set generatorlogistic map calculatorchaos phase portraitmandelbrot set plotterroute to chaoscoupled map lattice

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.