# Numerics: How do I renormalize the following DGL

+ 1 like - 0 dislike
22 views

This question is more about how to tackle a problem numerically.

In a small project I wanted to simulate the coorbital motion of Janus and Epimetheus. This is basically a three body problem. I choose Saturn to be fixed at the origin, let $r_1$ and $r_2$ be the location vectors of janus and epimetheus, respectively. Since the effect occurs when Janus and Epimetheus are very close together I picked relative coordinates for a better resolution, i.e. $r=r_1-r_2$ and $R=r_1+r_2$. Now I get the following equations of motion:

$$\frac {d^2}{dt^2} \binom{R}{r} = - G (m_2\pm m_1) \frac R {R^3} - 4 M G \left(\frac {r+R}{(r+R)^3} \mp \frac {r-R}{(r-R)^3}\right )$$

where $m_i$ corresponds to the masses of the moons, $M$ is the mass of Saturn and $G$ the gravitational constant. The problem arises when I try to solve this numerically. One has to deal with values of completely different magnitudes, i.e. $M \sim e^{28}$ and $m_i \sim e^{17}$. And $r$, $R$ are in the regions of 0 to 150 000.

To be honest I am not sure if this is the place forum to discuss such numerical problems.

Code is written in Matlab and I use a standard ODE solver to obtain the result. However this is breaking down because the step size cannot be reduced under machine precision. (I find this not to be surprising because one has to deal with the already mentioned orders of magnitude).

This post has been migrated from (A51.SE)
bios, thank you for asking. However: 1) More information is needed (in which language you are doing the simulation, which problems do you encounter, etc...). 2) Please put formulas inside the post, not as a link (to do so use $inline formula$ or $$full line formula$$. 3) Once you fix it, perhaps http://physics.stackexchange.com/ is a better place to ask it (as TP.SE is aimed at research-level questions, see [FAQ](http://theoreticalphysics.stackexchange.com/faq)).
 Please use answers only to (at least partly) answer questions. To comment, discuss, or ask for clarification, leave a comment instead. To mask links under text, please type your text, highlight it, and click the "link" button. You can then enter your link URL. Please consult the FAQ for as to how to format your post. This is the answer box; if you want to write a comment instead, please use the 'add comment' button. Live preview (may slow down editor)   Preview Your name to display (optional): Email me at this address if my answer is selected or commented on: Privacy: Your email address will only be used for sending these notifications. Anti-spam verification: If you are a human please identify the position of the character covered by the symbol $\varnothing$ in the following word:p$\hbar$ysicsOv$\varnothing$rflowThen drag the red bullet below over the corresponding character of our banner. When you drop it there, the bullet changes to green (on slow internet connections after a few seconds). To avoid this verification in future, please log in or register.