# Work done by gravitation on a system of two-body particles

Suppose we have two planets of masses $$m_1$$ and $$m_2$$ and of same radius $$r$$ kept a distance $$d$$.Owing to their gravitational force they both move and collide with each other. The system has undergone a change in potential energy. And this is negative of the work done by gravitational force. Now,according to the books,they assert the work done as $$-\int_{d}^{2r} \frac{Gm_1m_2}{x^2} \mathrm{d}x$$

But I am confused about how the formula is rigorously true since there is the dot product of force and displacement involved in finding work done. It is obvious that they calculated the work done on the system as a whole, but how do they assign the direction here? There are two bodies and the directions of their displacement are different and the forces being applied to the two bodies also differ in direction. So, how can they not account for those directions and simply deduced the formula taking negative of work done?

I tried to do the problem myself and began by finding the work done on each planet separately. Work done by gravitational force on $$m_1$$ is $$\int_{0}^{d_1} F \mathrm{d}x$$ The integral is positive since force and displacement are in the same direction. Here $$d_1$$ is the distance travelled by the center of the first planet at the time of collision. The same logic goes for $$m_2$$. Hence the total work done should be $$\int_{0}^{d_1} F \mathrm{d}x+\int_{d}^{d_1+2r} F \mathrm{d}x$$ But I don't think it matches with the formula in the book when put limits. Where did I go wrong then?

• I'm not clear on your question, you state the bodies are maintained at a constant distance but then they are in a collision? Are they orbiting or are they let go at a certain distance and allowed to collide? Commented Jul 25, 2022 at 19:03
• No,their initial distance was $d$. Both of them kept coming closer thereafter. Commented Jul 25, 2022 at 19:13
• I see, well you also mention a book, but we need more information. What book, what author, what page is this assertion on. It's likely they defined a coordinate system (most common would be the center of mass coordinates). But if one mass was much more massive then nothing stops you from making that object the center of your coordinate system. Commented Jul 25, 2022 at 19:20
• Actually the book is written in a native language and the pdf is hard to get,also just think of the problem as the typical spherical objects instead of planets to avoid any complex considerations. Commented Jul 25, 2022 at 19:34
• Notice that $~\int_{d}^{d_1+2r} F \mathrm{d}x=-\int^{d}_{d_1+2r} F \mathrm{d}x$
– Eli
Commented Jul 25, 2022 at 19:35

It is my understanding you are interested in determining the work done by gravity in moving the two masses together, assuming they begin at rest a distance $$d$$ between their center of masses.
So you first need to determine the COM of the two mass system. When the masses contact each other the location of the COM of the two masses should be the same as the COM of the two masses when they were a distance $$d$$ apart. Then the work done on each mass is then based on the displacement of each mass COM from its original location.