0

I am building a two body problem simulation in one dimension (plus time). Two masses m1, m2 at rest that start moving because of gravitation attraction and eventually meet.

I read that the problem has no closed form solution, so I opted for a numerical one (leapfrog). However, searching here I found several expressions for the velocity of the bodies (something that I need in order to depict the orthogonal curves to the (spacetime) trajectory of the bodies, which is the ultimate goal of the simulation, hence the title.) For instance:

$$v=\sqrt{\frac{2G(M+m)}{r}-\frac{2G(M+m)}{r_0}}$$

$$v=\sqrt{\int_{r_1}^{r_2} \left(\frac{2 G M}{r^2}+\frac{v_0^2}{r_1-r_2}\right) \, \text{d}r}$$

\begin{align} v_1&=\sqrt{\frac{Gm_2r_2}{\left(r_1+r_2\right)^2}}\\ v_2&=\sqrt{\frac{Gm_1r_1}{\left(r_1+r_2\right)^2}} \end{align}

I may have found one or two more that I can't locate now.

So my question is, is there a non numerical solution for this problem -- and I mean a solution that gives you algebraic equations for x1, x2, v1, v2 that I can use in the simulation (not integrals that may or may not be solvable). If so, what is it? Is any of the above expressions correct? (Please no polar coordinates if possible.)

Responding to the first comment below, the equations I am using are the usual equations for the two body problem:

$$F_1=G\frac{m_1m_2}{(x_1-x_2)^2}$$

therefore

$$\frac{d^2x_1}{dt^2}=G\frac{m2}{(x_1-x_2)^2}$$

As I have mentioned, I am using numerical leapfrog integration.

Gebar
  • 19
  • Welcome to the site. Your question would benefit from a few clarifications. What are the equations of motion you're trying to solve. We can't say which of the expressions are relevant to your system unless we know exactly what equations you want to solve... – nox Jan 12 '20 at 15:25
  • No, the linked answer does not answer my question. I specifically asked for expressions for x1, x2, v1, v2 (positions & velocities). The linked answer gives an expression for time that can be turned into an expression of position (which I can do hopefully) but gives no expression for velocities, which is my main concern at this point, since I already have the positions through numerical integration. As an aside, do all moderators that agreed to close this question agree that the given expression for time is correct? It seems pretty complicated and a second or third pair of eyes would not hurt. – Gebar Jan 13 '20 at 18:39

0 Answers0