a = acc(x, v, t); j = jerk(x, v, t); x += v*dt + 0.5*a*dt*dt; v += a*dt + 0.5*j*dt*dt; t += dt;Note that we only include the jerk in the velocity step, for the same reason as discussed in Exercise 5.2
In simple cases (e.g. harmonic motion), the jerk may be easily obtained by differentiation. Thus, for example, if
acc = -K * x;then
jerk = -K * v;In a more complex case, we might have:
acc = -K * sin(x);then
jerk = -K * cos(x) * v;etc.
--> What is the numerically measured order of this method for the nonlinear oscillator with
acc = -K x3and K = 4?