# Chaos! How Mars could smash into the Earth

## Chaos theory and the future of the Solar System

What will the Solar System look like in five billion years? Fascinatingly, we just don’t know. Check out my latest video to see how chaos theory stops us making hard predictions about the future motion of the planets with precision—and what that might mean for the fate of ours.

This has been in the works for a while! It was filmed in late 2020, but a few other things have happened in the intervening time (like, er, my book coming out). Since then, the nights have got warmer and Mars has moved to a slightly more respectable distance, but luckily it also means that this video is even more topical, as we’re a few months closer to any potential collision with Mars! Right?

I also learned a few amazing facts that didn’t make it into the final video:

## 1. Einstein saved the Solar System!

If you do these simulations with purely Newtonian gravity, there are chaotic disaster planet-smash solutions far more often. This is because the famous ‘precession of the perihelion of Mercury’ is more closely in sync with Jupiter’s orbit without the relativistic correction, and so the resonant effect that causes death and destruction is far stronger and more likely to happen. Add in the minute corrections from Einstein’s theory, and the Earth is a lot safer! You can read a lot more about this in a really fascinating and nerdy-but-readable summary of all this work on long-run Solar System forecasting.

## 2. Elliptical orbits are really hard!

I had no idea that there’s not a simple equation that can tell you the exact position of a planet in an elliptical orbit at time t, only approximations. Thus, my code for the positions of the planets in the simulation looked like this:

```// Time around the orbit would be just 2pi/T * t if circular
theta = 2*Math.PI/period * t + peri_arg;
// But we can turn the mean anomaly (theta here, more usually called M) into the true anomaly using this expansion,
// via https://farside.ph.utexas.edu/teaching/celestial/Celestial/node126.html and https://en.wikipedia.org/wiki/Equation_of_the_center
// (incredibly, there is no closed-form solution to this for an elliptical orbit)
// And I'm not sure why but I've lost pi radians somewhere so all the corrections need to be out by pi to work
theta_plus_pi = theta + Math.PI;
nu = theta +
e * 2*Math.sin(theta_plus_pi) +
e*e * 1.25*Math.sin(2*theta_plus_pi) +
e*e*e * (13/12*Math.sin(3*theta_plus_pi) - 0.25*Math.sin(theta_plus_pi)) +
e*e*e*e/96 * (103 * Math.sin(4*theta_plus_pi) - 44 * Math.sin(2*theta_plus_pi)) +
Math.pow(e, 5)/960 * (1097*Math.sin(5*theta_plus_pi) - 645*Math.sin(3*theta_plus_pi) + 50*Math.sin(theta_plus_pi)) +
Math.pow(e, 6)/960 * (1223*Math.sin(6*theta_plus_pi) - 902*Math.sin(4*theta_plus_pi) + 85*Math.sin(2*theta_plus_pi));```

This is the code version of this ridiculous series expansion. Thanks to the maths heroes who worked this out! It works up until an ‘eccentricity’ (also known as e, which basically means how non-circular an orbit is) of 0.6627 before things get weird… But, imprecise though it is, it’s plenty good enough to make planets go plausibly faster when near the Sun for a video!

Orbital dynamics is such wonderful and ridiculous and complicated maths. The more I learn about it, the more staggered I am by mathematical chops of early pioneers of astronomy, as well as their technical skill in measuring the precise positions needed to check their maths…

## 3. There are millions of minor bodies in the Solar System

In the video, I say that there are ‘thousands’ of minor bodies, like moons, comets and asteroids…but I was swiftly corrected on Twitter! NASA says there are between 1.1 million and 1.9 million asteroids larger than 1 km in the asteroid belt alone, and this amazing animation charts our discovery of asteroids since 1970…in 8K:

I particularly like the line of discoveries sweeping around with the Earth, presumably because these objects are brightest when opposite the Sun in the sky, so easiest to discover… I’m sure there are more subtleties that an asteroid nerd could spot in the data too!

## Credits

Many, many thanks to Tran Nguyen for filming this, particularly the opening and closing shots which were shot in the dead of night, in freezing temperatures!

Many thanks also to Tom Fuller for the beautifully subtle sound design. He also made the music for Invisible London. Listen to some more of his music at soundcloud.com/editar.