Lyapunov Exponent Calculator
Enter parameters to start.

Sensitivity to Initial Conditions

The term Lyapunov exponent describes how quickly nearby trajectories diverge under repeated iteration of a dynamical system. If two starting points differ by a tiny amount \delta0, after n steps the separation typically grows like \deltan\delta0eλn. The constant λ is the Lyapunov exponent. When λ is positive, tiny differences amplify exponentially, signaling chaos. A negative value implies convergence to a stable equilibrium or cycle.

Chaos theory often uses the logistic map xn+1=rxn(1-xn) as a simple model. The parameter r controls the system's behavior. For some values the iterates settle into a fixed point; for others, they exhibit complex periodic and chaotic regimes. Computing λ helps categorize these regimes quantitatively.

Deriving the Formula

The largest Lyapunov exponent for a one-dimensional map f equals λ=1Nk=0N-1\ln|f'xk| as N becomes large. For the logistic map, the derivative is f'x=r(1-2x). Each iteration both updates xk+1 and accumulates \ln|r(1-2x_k)|. Averaging these logs yields λ.

Positive Lyapunov exponents indicate sensitive dependence on initial conditions, one of the hallmarks of chaos. When λ<0, trajectories converge toward stable cycles or fixed points. A value of exactly zero usually marks a bifurcation where stability changes. By exploring different r values you can trace the road to chaos in the logistic family.

Running the Calculator

Specify r between 0 and 4, choose a starting point x_0 in (0,1), and set the number of iterations. When you press the button, the script iteratively updates xn and sums the logarithms of the derivatives. To avoid transient effects, the first few hundred iterates are typically discarded before averaging. This calculator automatically discards the first 100 steps if your total exceeds that amount.

The logistic map with r=2.5 quickly approaches a stable fixed point. The exponent is negative, reflecting contraction toward that point. At r=3.3, a two-cycle emerges, still yielding a negative exponent. By r3.57, the map becomes chaotic, and λ turns positive. Values near 4 produce strong chaos with λ around 0.69, the natural logarithm of two.

Interpreting Results

A positive Lyapunov exponent suggests that long-term prediction is impossible because errors grow exponentially. In physical systems such as weather models, this means that small uncertainties eventually overwhelm the forecast. In secure communications, chaotic systems with positive λ can scramble signals. When λ is negative, on the other hand, small perturbations die out and the system is stable.

By plotting λ versus r, one can reproduce the famous bifurcation diagram of the logistic map. Many values of r yield alternating chaotic and periodic windows. This rich structure showcases how nonlinearity leads to complex dynamics even in simple equations.

Implementation Details

The script runs entirely in the browser without external libraries. Because we use double precision floating-point numbers, extremely sensitive regions may show slight discrepancies from high-precision calculations, but the general trends remain correct. You may experiment with different initial seeds x_0. For chaotic regimes, varying x_0 yields dramatically different trajectories, yet the Lyapunov exponent is almost independent of the starting point once transients fade.

The algorithm is straightforward:

  1. Initialize x with the user-specified value.
  2. Iterate the logistic map, discarding a transient portion.
  3. At each step add \ln|r(1-2x)| to a running sum.
  4. Divide the sum by the number of iterations to obtain λ.

The calculator displays λ with six decimal places. Because the exponent can be small, running many iterations improves accuracy. Feel free to adjust the iteration count and observe how the estimate stabilizes.

Beyond the Logistic Map

Lyapunov exponents exist for higher-dimensional systems too. Lorenz attractors, predator-prey models, and driven pendulums all exhibit chaotic regimes characterized by positive exponents. While our tool focuses on the logistic map, the basic concept extends to any differentiable dynamical system. Understanding Lyapunov exponents helps scientists gauge predictability and the onset of chaos across disciplines.

Related Calculators

Atmospheric Scale Height Calculator - Planetary Atmospheres

Estimate the density scale height of an atmosphere using temperature, molar mass, and surface gravity.

atmospheric scale height calculator planetary atmosphere density profile

Dirichlet Distribution Calculator - PDF for 3 Variables

Evaluate the probability density of a 3-parameter Dirichlet distribution.

dirichlet distribution calculator

Markov Chain Steady-State Calculator - Find Stationary Distributions

Compute the stationary distribution of a small Markov chain using iterative multiplication.

Markov chain calculator steady state stochastic processes