- #1
mrsvan
- 2
- 0
Hi, I don't know if this is the right forum to adress, but I will try nevertheless
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.)
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.)