| Table of Contents |
| Table of Contents | 2 |
| Abstract | 4 |
| Introduction | 5 |
| 1.0 | Theory of the N-Body Problem | 7 |
| | 1.1 | The Background and History of the N-body Problem | 7 |
| | 1.2 | Newtonian Physics | 8 |
| | | 1.2.1 | An Example of Newtonian Physics With Just Two Bodies | 9 |
| | | 1.2.2 | An Example of Newtonian Physics With Four Bodies | 10 |
| | | 1.2.3 | A Detailed Example of Newtonian Physics With Two Bodies | 10 |
| | 1.3 | Development of Methods to Solve the N-body Problem | 17 |
| | 1.4 | What Is the "Best" Method? | 20 |
| | | 1.4.1 | The Efficiency of a Method | 20 |
| | | 1.4.2 | The Accuracy of a Method | 21 |
| | 1.5 | Types of Deviations In Star Movement | 23 |
| | | 1.5.1 | Gaining or Losing Energy | 23 |
| | | 1.5.2 | Distortion | 23 |
| | | 1.5.3 | Perihelion Shift | 23 |
| | | 1.5.4 | Overstep Phenomenon | 24 |
| | | 1.5.5 | Slingshot Effect | 25 |
| | | 1.5.6 | Program Bugs | 26 |
| | 1.6 | Speed-up Techniques | 27 |
| | 1.7 | The Error Term | 27 |
| 2.0 | Types of N-body ODE Integration Methods | 30 |
| | 2.1 | One Step Methods | 30 |
| | | 2.1.1 | Euler's Method (-m euler1) | 30 |
| | | 2.1.2 | Taylor Series (not implemented) | 31 |
| | | 2.1.3 | Runge-Kutta's Method (-m rk4) | 31 |
| | 2.2 | Multistep Methods | 33 |
| | | 2.2.1 | Modified Taylor Series Method (-m taylor3) | 34 |
| | | 2.2.2 | Adam-Bashford's Method (-m ab7 and -m ab4) | 34 |
| | 2.3 | Predictor-Corrector Methods | 35 |
| | | 2.3.1 | Modified Euler's Method (not implemented) | 36 |
| | | 2.3.2 | Adam-Moulton's Method (-m am7) | 36 |
| | 2.4 | Other formulas (Mid-point method) (none are implemented) | 37 |
| | 2.5 | The Gragg-Bulirsch-Stoer Method (-m gpemce8) | 38 |
| 3.0 | Variable Step Size N-Body ODE Integration Methods | 40 |
| | 3.1 | Method of Changing the Step Size | 41 |
| | 3.2 | Method of Changing Orders | 41 |
| | 3.3 | Method of Changing the ODE Integration Method | 41 |
| | 3.4 | Method of Internal Checking | 42 |
| 4.0 | Efficient Force Function Evaluation Methods | 43 |
| | 4.1 | Floating Point Rounding Errors and the Force Function | 44 |
| | 4.2 | Distant Stars Can Be Grouped Together | 45 |
| | 4.3 | Closely Packed Stars Can Be Moved at the Same Time | 46 |
| | 4.4 | Replace the Force Functions With a Potential Mesh | 47 |
| | 4.5 | Creating Tree Structures For Evaluating the Force Function | 48 |
| | 4.6 | Hybrid Force Evaluation Methods | 49 |
| 5.0 | Analysis of the ODE Integration Methods | 51 |
| 6.0 | Conclusion | 55 |
| References | 56 |