The Two-Body Problem: Going from Six Variables to One.
Suppose you have two objects interacting with a central force — where by “central force” we mean that the potential energy only depends on the relative position of the two objects. This two-body problem could be a a binary star system or two masses connected by springs. It doesn’t matter as long as the force acting on the two masses only acts along a line connecting them.
Just because it’s easier to visualize in real time, I’m going to look at two pucks on a frictionless table connected by a massless spring. Here is a python animation of the motion of these pucks (we will get to the code later).
If I wanted to model this system with Lagrangian Mechanics (here is my summary of three different ways to solve mechanics problems), then I need both the kinetic energy and potential energy of the system. Remember, the Lagrangian is defined as:
Where m_1 and v_1 are the mass and velocity of one object (and then the “2's” for the other object). The goal is to get this stuff…