For a small number of bodies, an n -body problem can be solved using direct methods, also called particle–particle methods. These methods numerically integrate the differential equations of motion. Numerical integration for this problem can be a challenge for several reasons. First, the gravitational potential is singular; it goes to infinity as the distance between two particles goes to zero. The gravitational potential may be "softened" to remove the singularity at small distances: U ε ε = ∑ ∑ 1 ≤ ≤ i < j ≤ ≤ n G m i m j ‖ q j − − q i ‖ 2 + ε ε 2 Second, in general for n > 2, the n -body problem is chaotic, which means that even small errors in integration may grow exponentially in time. Third, a simulation may be over large stretches of model time (e.g. millions of years) and numerical errors accumulate as integration time increases.