Double Pendulum Chaos Simulator Back
Dynamics and Chaos

Double Pendulum Chaos Simulator

Integrate the double pendulum equations with 4th-order Runge-Kutta in real time. Two trajectories with initial angles offset by just 0.001° let you visually experience the butterfly effect of chaos.

Initial Conditions

Presets

Results
Elapsed time [s]
0.000
Total Mechanical Energy [J/kg]
Position Difference of 2 Trajectories [m]
Tip velocity v₂ [m/s]
Trajectory 1 (baseline) Trajectory 2 (+ε)
Cvanim
Trajectory 1 (θ₁, θ₂) path
Cvphase
Div

Vertical axis (log scale): distance d(t) between the two trajectory tips. Slope ≈ Lyapunov exponent λ.

Theory & Key Formulas

$\ddot\theta_1 = \dfrac{-r\dot\theta_2^2\sin\Delta - 2g\sin\theta_1 - \cos\Delta\bigl(\dot\theta_1^2\sin\Delta - g\sin\theta_2\bigr)}{2-\cos^2\Delta}$

$\ddot\theta_2 = \dfrac{2\dot\theta_1^2\sin\Delta - 2g\sin\theta_2 + \cos\Delta(r\dot\theta_2^2\sin\Delta + 2g\sin\theta_1)}{r(2-\cos^2\Delta)}$

$\Delta = \theta_1 - \theta_2$

Integration: fourth-order Runge-Kutta, dt=0.005 s

🙋 'Deterministic but unpredictable'—what does that mean?

🙋
The double pendulum has proper mechanical equations, so why is it called 'chaotic'? If we have the equations, shouldn't we be able to calculate the future?
🎓
In principle yes, but the problem is that 'observational error always exists, even for the same initial conditions.' Let's try it with this simulator. If you look at two trajectories starting from θ₁=120° and 120.001° (a difference of 0.001°), they overlap at first, but after a few seconds they become completely different. This is 'sensitivity to initial conditions'—the essence of chaos.
🙋
Looking at the 'Trajectory Divergence' tab, the distance keeps increasing. Is this exponential growth?
🎓
Exactly. Since the vertical axis is on a logarithmic scale, if it increases linearly, then d(t) ∝ exp(λt), meaning exponential growth. The slope λ is the Lyapunov exponent, which for a double pendulum is typically around λ ≈ 1 to 3 s⁻¹. For example, if λ=2, the difference becomes e²≈7 times larger after 1 second. Even if position accuracy is on the order of mm, after a few seconds the error becomes on the order of meters.
🙋
But with the 'Small Amplitude (Linear)' preset, the two trajectories stay overlapped. Doesn't it become chaotic?
🎓
Great observation. For small amplitudes (θ≪1 rad), the linearization sin θ ≈ θ holds, and it becomes a 'coupled oscillation' with two natural vibration modes. This is an integrable system, allowing long-term prediction. Chaos only appears when the energy is high (large swing amplitude). In physics, we often see the pattern: 'linear → integrable → predictable' and 'nonlinear → potentially chaotic → difficult to predict.'
🙋
Is that the same reason weather forecasts are 'difficult beyond a week'?
🎓
Exactly. The 'Lorenz attractor,' discovered by Lorenz in the 1960s, is a simplified model of the atmosphere and showed that chaos fundamentally makes weather prediction difficult. Because initial observational errors in the atmosphere grow to the scale of the entire system in about two weeks, precise forecasts beyond two weeks are considered fundamentally difficult. This is the origin of the name 'butterfly effect'—the metaphor that 'the flap of a butterfly's wings in Brazil can cause a tornado in Texas.'
🙋
Is chaos only a nuisance, or can it be useful too?
🎓
Actually, it has many applications. Using chaotic flow in fluid mixing allows uniform mixing with less energy (e.g., in microfluidic chips). In chaotic cryptography, sensitivity to initial conditions is used as an encryption key. Also, analyzing the chaotic characteristics of an electrocardiogram can distinguish between a healthy heartbeat and arrhythmia. Chaos is not random but 'structured complexity,' so there is room for control and utilization.

Frequently Asked Questions

Chaos is deterministic—starting from the same initial conditions always yields the same trajectory. Randomness is probabilistic (true uncertainty), where the same initial conditions can produce different results each time. The double pendulum is described by exact equations, so there is no randomness at all. The key difference is that due to finite observational precision, it becomes practically unpredictable.
The equation of motion for a simple pendulum, θ̈ + (g/L)sinθ = 0, is a conservative (energy-conserving) single-degree-of-freedom system. By Liouville's theorem, phase space volume is preserved. According to the Arnold-Liouville theorem, it is integrable (solvable by integration), and by the KAM theorem, the motion remains on a torus and does not become chaotic. In nonlinear systems with two or more degrees of freedom, integrability can break down, allowing chaos to emerge.
Two trajectories starting from initial states x₀ and x₀+δ₀ (a small perturbation) are integrated in parallel, and the distance δ(t) at time t is measured. The Lyapunov exponent is λ = lim_{t→∞} (1/t) * ln(δ(t)/δ₀). In practice, when the distance becomes too large, renormalization (resetting δ to δ₀ and continuing to measure δ) is necessary. This simulator shows simple divergence without renormalization, so accuracy decreases after a sufficiently long time.
A numerical method for solving ordinary differential equations. At each step, four gradient evaluations are performed, and the next step is calculated using Simpson-like weighting. With 4th-order accuracy (local error ∝ dt⁵), it is more accurate than the simple Euler method (1st order) and can integrate nonlinear systems like the double pendulum relatively stably. In chaos, tracking the true trajectory is impossible, but statistical properties (such as the Lyapunov exponent) can be calculated accurately.
In the frictionless (conservative) setting, the total mechanical energy E = T + V should remain constant. Numerical integration errors cause a slight energy drift, but with RK4 and dt=0.005, the error is kept small even over long periods. This simulator displays the 'Total Mechanical Energy' in the statistics card, so you can check whether the energy remains constant over time.

What is Double Pendulum Chaos?

Double Pendulum Chaos is a fundamental topic in engineering and applied physics. This interactive simulator lets you explore the key behaviors and relationships by directly manipulating parameters and observing real-time results.

By combining numerical computation with visual feedback, the simulator bridges the gap between abstract theory and physical intuition — making it an effective learning tool for students and a rapid-verification tool for practicing engineers.

Physical Model & Key Equations

The simulator is based on the governing equations behind Double Pendulum Chaos Simulator. Understanding these equations is key to interpreting the results correctly.

Each parameter in the equations corresponds to a slider in the control panel. Moving a slider changes the equation's solution in real time, helping you build a direct connection between mathematical expressions and physical behavior.

Real-World Applications

Engineering Design: The concepts behind Double Pendulum Chaos Simulator are applied across mechanical, structural, electrical, and fluid engineering disciplines. This tool provides a quick way to estimate design parameters and sensitivity before committing to full CAE analysis.

Education & Research: Widely used in engineering curricula to connect theory with numerical computation. Also serves as a first-pass validation tool in research settings.

CAE Workflow Integration: Before running finite element (FEM) or computational fluid dynamics (CFD) simulations, engineers use simplified models like this to establish physical scale, identify dominant parameters, and define realistic boundary conditions.

Common Misconceptions and Points of Caution

Model assumptions: The mathematical model used here relies on simplifying assumptions such as linearity, homogeneity, and isotropy. Always verify that your real system satisfies these assumptions before applying results directly to design decisions.

Units and scale: Many calculation errors arise from unit conversion mistakes or order-of-magnitude errors. Pay close attention to the units shown next to each parameter input.

Validating results: Always sanity-check simulator output against physical intuition or hand calculations. If a result seems unexpected, review your input parameters or verify with an independent method.