<p>I tried to solve the three body problem numerically.
While after 1000 time steps the system looks stable (See Fig.1)
it is completely unstable after 10000 time steps (See Fig.2).
Is that an intrinsic property of the three body problem or a mistake in my code or initial conditions?
<a href="https://i.sstatic.net/l59Lk.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/l59Lk.png" alt="N=1000"></a>
<a href="https://i.sstatic.net/UgqJa.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/UgqJa.png" alt="N=10000"></a></p>

CC BY-SA 4.0
2019-06-06T17:39:24.467Z
The IT-support question "did you try to switch it off and on again?" can be adjusted here for astrophysics, namely: "Did you try to make your timestep smaller?"
AtmosphericPrisonEscape
CC BY-SA 4.0
2019-06-06T19:04:02.020Z
Many three body problems will not be stable (in the sense of producing orbits).  Numerically they're very prone to problems,  If you haven't, I'd start by reading [this Wikipedia page](https://en.wikipedia.org/wiki/N-body_simulation) and related links.  You might particularly want to try an approach based on [perturbation principles](https://en.wikipedia.org/wiki/Perturbation_(astronomy)).  [This paper](https://arxiv.org/pdf/1109.0130.pdf) on a technique known as Clean Numerical Simulation (CNS) might be of interest.
StephenG - Help Ukraine
CC BY-SA 4.0
2019-06-06T19:52:04.497Z
@StephenG Please link to abstracts instead of PDFs, e.g. [Liao 2013](https://arxiv.org/abs/1109.0130).
Mike G
CC BY-SA 4.0
2019-06-06T20:00:46.470Z
@Mike  Sorry about that.  I had thought I'd pasted a link to the abstract, but clearly a mistake on my part.
StephenG - Help Ukraine
CC BY-SA 4.0
2019-06-06T20:23:04.947Z
If you provide some more detail about your simulation, it will be easier to help, but my guess is that you've used a too small gravity softening length (or maybe even none?). Then if particles come too close to each other, forces may blow up due to numerical inaccuracies. Note though that in principle there may be no error, since the three-body problem is not necessarily stable; one particle may be slingshot away, also in real life.
pela
<astrophysics><python><n-body-simulations>
Three Body Problem
Elskrt
# Three Body Problem

(Asked by: username_0 on 2019-06-06)

I tried to solve the three body problem numerically.
While after 1000 time steps the system looks stable (See Fig.1)
it is completely unstable after 10000 time steps (See Fig.2).
Is that an intrinsic property of the three body problem or a mistake in my code or initial conditions?
[![N=1000](https://i.sstatic.net/l59Lk.png)](https://i.sstatic.net/l59Lk.png)
[![N=10000](https://i.sstatic.net/UgqJa.png)](https://i.sstatic.net/UgqJa.png)

**Tags:** astrophysics, python, n-body-simulations
> **Comments:**
> **username_1**: The IT-support question "did you try to switch it off and on again?" can be adjusted here for astrophysics, namely: "Did you try to make your timestep smaller?"  
> **username_2**: Many three body problems will not be stable (in the sense of producing orbits).  Numerically they're very prone to problems,  If you haven't, I'd start by reading [this Wikipedia page](https://en.wikipedia.org/wiki/N-body_simulation) and related links.  You might particularly want to try an approach based on [perturbation principles](https://en.wikipedia.org/wiki/Perturbation_(astronomy)).  [This paper](https://arxiv.org/pdf/1109.0130.pdf) on a technique known as Clean Numerical Simulation (CNS) might be of interest.  
> **username_3**: @StephenG Please link to abstracts instead of PDFs, e.g. [Liao 2013](https://arxiv.org/abs/1109.0130).  
> **username_2**: @Mike  Sorry about that.  I had thought I'd pasted a link to the abstract, but clearly a mistake on my part.  
> **username_4**: If you provide some more detail about your simulation, it will be easier to help, but my guess is that you've used a too small gravity softening length (or maybe even none?). Then if particles come too close to each other, forces may blow up due to numerical inaccuracies. Note though that in principle there may be no error, since the three-body problem is not necessarily stable; one particle may be slingshot away, also in real life.  

---

## 0 answers

