Euler vs Runge-Kutta for projectile motion

1.6k Views Asked by At

I've got to solve numerically the projectile motion equations with the Euler method and the Runge-Kutta 4th order method. Although my codes (Matlab) work, i keep getting exactly the same answers from both of the methods whereas i should get a more accurate answer from the second one. What am i doing wrong? I am supposed to compare the accuracy of the two methods with respect to time (for the same given n) and to the range of the time step. Thank you. Runge-Kutta Euler

1

There are 1 best solutions below

8
On BEST ANSWER

The semi-implicit or symplectic Euler method that you implemented has order 2 if the initialization is compatible with the leapfrog-Verlet method. The exact solution of this problem is a polynomial of degree 2. Thus this Euler method is exact up to floating point noise. Of course also the RK4 method is exact in the same way.

Add a suitable friction term to get a solution that is no longer polynomial and will thus have different results between the methods. Or implement the Euler method properly so that it is the explicit order 1 variant.