# N-body problem

by LizardKing23
Tags: nbody
 P: 138 Don't worry, you are not looking arrogant here, you are looking like pure mathematician. The 3D law of gravity is $$\vec{F_2}=-G\frac{m_1 m_2}{R_{12}^2}\frac{\vec R_{12}}{R_{12}}$$ The Force is directed along the line connecting the bodies and it is attractive. or $$\vec{F_2}=-G\frac{m_1 m_2}{(x_2-x_1)^2+(y_2-y_1)^2+(z_2-z_1)^2}\frac{\vec R_{12}}{R_{12}}$$
 Sci Advisor HW Helper PF Gold P: 4,771 It means they are vector quantities. I find shyboy has written the law in a peculiar manner. I would have written.. consider two point-masses m1 and m2 respectively, and respectively located by the position vectors $\vec{r_{1}}$ and [itex]\vec{r_{2}}[/tex] $$\vec{F}_{1\rightarrow 2} = -\frac{Gm_1m_2 \vec{r_{12}}}{|\vec{r_{12}}^3|} = -\frac{Gm_1m_2 \hat{r_{12}}}{|\vec{r_{12}}^2|}$$ Where $$\vec{r_{12}} = \vec{r_{2}} - \vec{r_{1}}$$ Or, in ugly cartesian coordinates... $$\vec{F}_{1\rightarrow 2} = \frac{-Gm_1m_2}{\Left[(x_1-x_1)^2+(y_2-y_1)^2+(z_2-z_1)^2\Right]^{3/2}} \left( (x_2-x_1)\hat{x} + (y_2-y_1)\hat{y} + (z_2-z_1)\hat{z} \right)$$