Hi, I dunno if this is the right forum to adress, but I will try nevertheless(adsbygoogle = window.adsbygoogle || []).push({});

Im solving a simple two-dimensional differential equation:

dx/dt = (-y,x)

which will give a circle when integrating over time.

Now, the problem is that the simple euler scheme seems to be a lot more precise than the runge-kutta fourth order method. I've spend two whole days trying to debug my code and I feel stuck. so, are there some special cases where rk is worse than euler -- or is there no other explanation than I have made a mistake somewhere (it's four lines of code and my supervisors have had a look without the error popping up.)

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Runge-kutta vs euler

**Physics Forums | Science Articles, Homework Help, Discussion**