Solves an ODE using the RK4 Method