Particle in a Double Potential Well
This simulation shows a particle moving in a double-well potential \(U(x) = x^4 - 2x^2\). The left canvas shows the potential energy landscape with two minima at \(x = \pm 1\). The right canvas shows the phase space trajectory \((x, v)\).
With small damping, the particle can oscillate between the two wells. Adjust the damping constant to see the particle settle into one well.
Numerical Method
The equation of motion is written as the first-order system \(\dot{x} = v,\ \dot{v} = -c\,v - 4x(x^2 - 1)\) and advanced with the classical 4th-order Runge-Kutta (RK4) method at a fixed step \(\Delta t = 0.01\). RK4 evaluates the slope four times per step and combines them in a weighted average, giving \(O(\Delta t^4)\) accuracy that resolves the inter-well oscillations cleanly.
For strong damping (\(c > 10\)) the system becomes stiff and the explicit RK4 step can go unstable. The solver then switches to the implicit second-order backward differentiation formula (BDF2), \(y_{n+1} = \tfrac{4}{3}y_n - \tfrac{1}{3}y_{n-1} + \tfrac{2}{3}\Delta t\,f(y_{n+1})\), whose nonlinear update is solved each step with Newton's method. The first two steps are bootstrapped with RK4 to build the required history, and each Newton solve is seeded with a second-order linear-extrapolation predictor \(y_{n+1}^{(0)} = 2y_n - y_{n-1}\) for fast, robust convergence. This keeps the integration stable as the particle settles into one of the wells.
\( \textcolor{midnightblue}{\textbf{Equation of Motion:}} \) \( \textcolor{maroon}{\ddot{x} + c \dot{x} + 4x(x^2 - 1) = 0, \quad x(0) = x_0, \quad \dot{x}(0) = v_0} \)
\( \textcolor{midnightblue}{\textbf{Potential Function:}} \) \( \textcolor{maroon}{U(x) = x^4 - 2x^2} \)
Cite this tool
Kapita, S. (2026). Particle in a Double Potential Well. Math Tools. https://shelvean.github.io/math-tools/double_potential.html
Kapita, Shelvean. "Particle in a Double Potential Well." Math Tools, 2026, shelvean.github.io/math-tools/double_potential.html.
@online{kapita2026doublepotential,
author = {Shelvean Kapita},
title = {{Particle in a Double Potential Well}},
year = {2026},
organization = {Math Tools},
url = {https://shelvean.github.io/math-tools/double_potential.html}
}