A Numerical Simulation of the Three-Body Problem

Hello, my fellow physicists! It’s your friend, philosopher(self-proclaimed), gui—sorry, that would have been an overstatement(I ain’t gonna take responsibility for your research grants). Anyway, fellas, Captain Quanta’s back after a loooooong time, and he’s back to settle some debts(not literally). I just needed some training arc of my own to gain some level-ups and tell you some better stories (based on true events) about science. You already see what’s gonna come from the title of the article(It’s the three-body problem if you can’t read big letters), but there’s also a personal story regarding the topic. You can say it’s gonna be a mix of scientific and personal blog. So, without further ado, let’s get back to business!

INTRODUCTION TO THE THREE-BODY PROBLEM

There was a time, a time when an apple could make a man think, ‘Why the hell is this falling?!’. The thought of questioning the mundane and obvious, the very fact that makes you feel stupid in front of everyone, is the very essence of unquenchable curiosity, undying grit and determination, and the never-ending passion for discovery. It is the spirit of science that may make you feel like a laughing stock, but stay true to yourself and keep believing, then the Universe shall reward you for your efforts. You can ask why I am starting like this, it’s because our topic depends on the fundamental force discovered by the man who dared to ask this stupid question, “Why the hell is this apple falling?!”. Yes, I am talking about gravity, the mysterious force of attraction. You probably know how gravitational attraction works between two bodies according to Newton’s law of gravitation. But what I intend to talk about in this article is a bit more complicated, and the complications arise due to the inclusion of a third body.

(Disclaimer: Although the problem we are going to discuss can be extended to scenarios where the forces are not gravitational, we are strictly sticking to our familiar gravitational force in this article.)

Suppose we take a binary system(Example: Two stars orbiting around each other in outer space), we can easily find out their mutual gravitational attraction using Newton’s law of gravitation. Thus, we can analytically solve their equations of motion and study the dynamics of this binary system. But things get really complicated when we include a third body into this system, as the equations of motion are coupled, and the motion of one body depends on the motion of the other two bodies. This system is now called a three-body system, and the problem of analysing this three-body system is called the three-body problem.

THEORETICAL PREMISE

In 1889, to celebrate the 60th birthday of King Oscar II of Norway and Sweden. It was announced that whoever could find an analytical solution to the three-body problem would be given a prize consisting of a gold medal and 2,500 Swedish kronor (don’t ask me its value in today’s world). The prize was later awarded to Henri Poincaré, not for an analytical solution to the three-body problem, but for proving that the three-body problem cannot be solved analytically. 

His study of three body systems led to the discovery that a three-body system is inherently chaotic(Any similarity to your personal experience is purely coincidental), which means that an extremely tiny change in the initial conditions can lead to vastly different results. So, in general, it is impossible to find a closed-form solution to this problem (in simpler words, it is analytically unsolvable). Then the real question arises: how do we solve this three-body problem?

METHODOLOGY & RESULTS

As our problem is analytically unsolvable, we resort to a numerical solution. Here comes the personal connection: I had to program a Python code to simulate the trajectories of a three-body system in my Master’s coursework recently. In my program, I had to use the Runge-Kutta Fehlberg algorithm to integrate the solutions of the equations of motion of each of the three bodies. As the equations of motion are coupled, each step had to be precisely integrated. For that, a variable step size was used for each step, depending on a tolerance value. I am sorry if this is a bit technical for some readers. The integration had to be done in extremely small steps, and the steps were not fixed as the integration became extremely complex, especially when two bodies came very close.

For the numerical simulation of my three-body system, I had to consider a system of three stars with comparable masses along with their respective initial positions. It was assumed that they all started at rest, so their initial velocity was zero. The trajectory of the three stars came out to be like this.

Three Body trail
Trajectory of the three stars

Additionally, I created a simulation for a larger time frame, but I did not plot the results as I had in the previous simulation. Instead, I made an animation of the simulation of the system using VPython. 

Here, I should have accounted for the collision of stars, and so, they collide and kinda bounce back again. Also, only gravitational attraction between the stars is assumed. But the key property that these results show is that there is an inherent chaotic behaviour in the system.

CONCLUSION

The study of the three-body problem provides us with interesting insights into the inherent unpredictability of chaotic systems and can help us to gain a deeper understanding of the evolution of complex astrophysical systems. It helps us in predicting the dynamics of a system, which is usually too complicated to solve using analytical tools. This small project helped me in learning a lot about the evolution of dynamical systems and how to approach a problem from scratch, especially if you know nothing about it. Another thing that happened during this project(this is not an official project, but a project-like problem) was the development of my coding skills. I feel much more confident about my programming skills now. 

I hope to contribute more articles of this type in the near future. I also would like to be more active with my writing as I have a few more ideas about things I wanna write about. But for now, this project further solidifies the increasing importance of machines. It is true that there is no substitute for the human mind, but some things are too complicated to be handled by us(please don’t start taking this as an AI propaganda post, I am also not okay with AI potentially taking over my job). Just like calculators, computers, and mobile phones came and they became a part of our daily lives, we also need to accept the pace of the ever-changing world we live in and adapt to its needs. The one who can adapt is the one who survives. Anyways, it was fun writing something after a long time. Hopefully, some of my fellow physicists are still out there. Will see you guys soon with another one. For now, this is Captain Quanta, signing off!

2 thoughts on “A Numerical Simulation of the Three-Body Problem”

  1. “Here, I should have accounted for the collision of stars, and so, they collide and kinda bounce back again.”
    Why?
    In reality they would collide and form a bigger mass and if there are any debris, it would either accumulate to form another planetory object and would be stuck within the same three-body problem.

    Reply
    • Yes, and I did not account for star mergers. That’s why they collide and bounce back. It’s a rather simplistic model where only gravitational attraction is working between the stars

      Reply

Leave a Comment