At 9/21/09 05:33 PM, LeechmasterB wrote:
And now i see why searching didn't show much results on this:
semi-implicit Euler method, also called symplectic Euler :P
hehehe, and yeh; i did another test, and RK4 this time did come out slightly ontop in terms of stability.
However, one thing that is interesting to note, is that considering the following situation:
a body orbiting a static sun in a highly elliptical orbit:
using RK4 integration, the body will over time enter a shorter and shorter orbit, as RK4 loses energy over time.
using sympletic integration, the body will over time, have it's perhilion advance, and gain energy at a slower rate than the RK4 approach will gain energy.
http://spamtheweb.com/ul/upload/210909/8 2284_compare_eueler_rungekutta_solar.php
red is RK4, black is sympletic euler, fixed time step, in this situation at whch both approaches fail, i would consider sympletic euler to give the best results, not only because it doesn't explode, but because in reality orbits do have advancing perihelion (the orbit itself rotates) (look at mercury) which although this is not modelling it, it's an indirect result :P
However i do retract my previous statement, RK4 is still in general more stable (if only by a small margin for the massively increased level of computational complexity) than sympletic euler.