Lyapunov Exponent Calculator
Lyapunov Exponent Calculator calculates the Lyapunov exponent for a differential equation \\( x’ = f(x, r) \\), showing sensitivity to initial conditions with MathJax steps and p5.js visualization of trajectory divergence.
Lyapunov Exponent Calculator
Lyapunov Exponent Calculator computes the Lyapunov exponent for a differential equation \\( x’ = f(x, r) \\), measuring sensitivity to initial conditions. Input the ODE, parameter, initial condition, time span, and perturbation size to see the exponent with MathJax-rendered steps and a p5.js visualization of trajectory divergence. Results are copyable, with sharing and embedding options for dynamical systems students.
Example 1: Cubic ODE (Stable Fixed Point)
ODE: \\( x’ = x – x^3 \\), Parameter: \\( r = 1 \\), Initial: \\( x(0) = 0.1 \\), Time Span: 10, Perturbation: \\( \epsilon = 0.0001 \\).
Step 1: Define the system.
\\( x’ = x – x^3 \\), \\( r = 1 \\), \\( x(0) = 0.1 \\), second initial condition: \\( x_2(0) = 0.1 + 0.0001 \\), \\( T = 10 \\).
Step 2: Numerical integration.
Use RK4 to solve for \\( x_1(t) \\) and \\( x_2(t) \\) over \\( [0, 10] \\).
Step 3: Compute divergence.
At \\( t = 10 \\), suppose \\( |x_1(10) – x_2(10)| \approx 0.00005 \\).
Step 4: Calculate Lyapunov exponent.
\\( \lambda \approx \frac{1}{10} \ln \left( \frac{0.00005}{0.0001} \right) \approx -0.0693 \\).
Step 5: Conclusion.
Negative \\( \lambda \\) indicates convergence to a stable fixed point.
Example 2: Logistic Growth (Chaotic Regime)
ODE: \\( x’ = r x (1 – x) \\), Parameter: \\( r = 4 \\), Initial: \\( x(0) = 0.1 \\), Time Span: 10, Perturbation: \\( \epsilon = 0.0001 \\).
Step 1: Define the system.
\\( x’ = 4 x (1 – x) \\), \\( r = 4 \\), \\( x(0) = 0.1 \\), second initial condition: \\( x_2(0) = 0.1 + 0.0001 \\), \\( T = 10 \\).
Step 2: Numerical integration.
Use RK4 to solve for \\( x_1(t) \\) and \\( x_2(t) \\) over \\( [0, 10] \\).
Step 3: Compute divergence.
At \\( t = 10 \\), suppose \\( |x_1(10) – x_2(10)| \approx 0.5 \\).
Step 4: Calculate Lyapunov exponent.
\\( \lambda \approx \frac{1}{10} \ln \left( \frac{0.5}{0.0001} \right) \approx 0.8516 \\).
Step 5: Conclusion.
Positive \\( \lambda \\) indicates chaotic behavior.