Particle in a Potential Well
This simulation shows a particle (the bowling ball) moving in a one-dimensional potential \(U(x)\). Pick one from the drop-down menu to explore a whole family. Some are closed (bounded) wells where the particle is trapped and oscillates forever - harmonic, anharmonic, double, tilted, and triple wells, and the periodic pendulum. Others are open (unbounded), like the cubic: a metastable well with a barrier the ball can roll over and escape to infinity - the metastable and symmetric barriers, the tilted washboard (running vs. locked motion), and a Gaussian barrier to scatter over. The localized Morse, Gaussian, and Pöschl–Teller wells sit in between. The left canvas shows the energy landscape with the ball rolling on the surface; the right shows the phase-space trajectory \((x, v)\).
The motion obeys \(\ddot{x} + c\,\dot{x} + U'(x) = 0\): the ball accelerates downhill along \(-U'(x)\) and loses energy to damping \(c\). Adjust the initial position, velocity, and damping to explore oscillations, barrier crossing, and escape.
Numerical Method
The equation of motion is written as the first-order system \(\dot{x} = v,\ \dot{v} = -c\,v - (1 - x^2)\) 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 nonlinear 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 while the particle settles toward equilibrium.
\( \textcolor{midnightblue}{\textbf{Equation of Motion:}} \) \( \textcolor{maroon}{\ddot{x} + c \dot{x} + (1 - x^2) = 0} \)
\( \textcolor{midnightblue}{\textbf{Potential Function:}} \) \( \textcolor{maroon}{U(x) = x - \dfrac{1}{3}x^3} \)
Cite this tool
Kapita, S. (2026). Particle in a Potential Well. Math Tools. https://doi.org/10.5281/zenodo.20981346
Kapita, Shelvean. "Particle in a Potential Well." Math Tools, 2026, doi.org/10.5281/zenodo.20981346.
@online{kapita2026potential,
author = {Shelvean Kapita},
title = {{Particle in a Potential Well}},
year = {2026},
organization = {Math Tools},
doi = {10.5281/zenodo.20981346},
url = {https://doi.org/10.5281/zenodo.20981346}
}