# Find the velocity of three planets about their centre of mass

Just wanted to check if I've done this right, because it isn't working.

Mercury: mass $$3.285 \times 10^23\ \mathrm{kg}$$ position: $57,910,000,000\ \mathrm{m}$ from sun

Earth: mass $$5.972 \times 10^24\ \mathrm{kg}$$ position: $149,600,000,000\ \mathrm{m}$ from sun

Sun: mass $$1.98855 \times 10^30\ \mathrm{kg}$$ position: start it off at $(0, 0)$. Assume all y co-ordinates are zero at start. To work out where the center of mass is, use $$Mx_{\text{c.o.m.}} = \sum mx$$ rearrange for $$x_{\text{com}}$$ and compute to get the center of mass at $x = 458844$. To be in the center of mass frame, I now have to subtract this from the initial positions.

Sun: position $(-458844, 0)$

Earth: $149,995,000,000$

Mercury: $57,909,500,000$,

To work out their velocities about the center of mass, use $v = \large \frac{2\pi r}{T}$, and here's the problem: What is $T$ for mercury, the Earth and the Sun? Earth around Sun is $365$ days, Mercury round Sun is $88$ days, but what is their period around the center of mass?

If you mean the velocity of center of mass then simply take the derivative of $x_{\text{c.o.m}}$ and put the velocities of each planet in the formula and you should be good:
$$V=\frac{1}{M}\sum m_iV_i$$