4th Order Runge Kutta help
I would like help in applying the 4th Order Runge Kutta method to Newton's Second Law of Motion, rather than the Euler Method, as I'm putting alot of effort into calculating the forces in my problems and don't want to skimp on accuracy in other areas.
I've seen many sites with the RK4 equations:
y(i+1) = y(i) + h/6 * (k1 + 2*k2 + 2*k3 + k4)
k1 = f(x(i), y(i))
k2 = f(x(i) + h/2, y(i) + k1 * h/2)
k3 = f(x(i) + h/2, y(i) + k2 * h/2)
k4 = f(x(i) + h, y(i) + h * k3)
But, the examples I've seen are all in the form dy / dx = x + y or dy / dx = c * x, with one or both x and y on the right-hand side. If I apply it to Newton's 2nd Law: dv / dt = F / m there is no v or t term on the right-hand side, unless I break up the derivate as with Euler, shown below.
I've worked through with Euler to get:
v(i+1) = v(i) + (F / m) * (t(i+1) - t(i))
to compare with the Runge Kutta method.
I need help with using this method. Thanks in advance.