Computing the Jacobian matrix for a solar system simulation

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 4K views
doonzy
Messages
2
Reaction score
0
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:

[tex]J = \begin{pmatrix}<br /> \frac{\partial F_1}{\partial r_1} & \frac{\partial F_1}{\partial r_2} & \frac{\partial F_1}{\partial r_3}\\ <br /> \frac{\partial F_2}{\partial r_1} & \frac{\partial F_2}{\partial r_2} & \frac{\partial F_2}{\partial r_3}\\ <br /> \frac{\partial F_3}{\partial r_1} & \frac{\partial F_3}{\partial r_2} & \frac{\partial F_3}{\partial r_3}<br /> \end{pmatrix}[/tex]

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

Some clarification would be much appreciated :-)

Thanks.
 
Physics news on Phys.org
Well, ##r^2=\sqrt{r_1^2+r_2^2+r_3^2}##, hence ##F\, : \,\mathbb{R}^3 \longrightarrow \mathbb{R}## which means it has only one component and your Jacobian matrix is a gradient, i.e. of size ##1 \times 3##. The derivative is the same as at school: differentiate with only one variable ##r_i## and consider all other values as constant.