# Computing the Jacobian matrix for a solar system simulation

1. Aug 6, 2010

### doonzy

Hello physicists!

I'm a comp sci student and I am trying to graphically model a simplified version of the solar system as part of a programming exercise. In order to apply the gravitational forces to the planets, I need to compute the Jacobian matrix as it relates to two particles (planetary objects). My (limited) understanding is that the resulting matrix will be 9x9, but I am unsure how it is constructed exactly. This is what I have come up with so far:

$$J = \begin{pmatrix} \frac{\partial F_1}{\partial r_1} & \frac{\partial F_1}{\partial r_2} & \frac{\partial F_1}{\partial r_3}\\ \frac{\partial F_2}{\partial r_1} & \frac{\partial F_2}{\partial r_2} & \frac{\partial F_2}{\partial r_3}\\ \frac{\partial F_3}{\partial r_1} & \frac{\partial F_3}{\partial r_2} & \frac{\partial F_3}{\partial r_3} \end{pmatrix}$$

where $$\frac{\partial F_i}{\partial r_i}$$ is 3x3, $$F$$ is the gravitational force $$F = \frac{Gm_1m_2}{r^2}$$ and $$r$$ is the respective dimension component $$(x, y, z)$$.

Some clarification would be much appreciated :-)

Thanks.