// Prediction a = acc(x, v, t); x += v*dt + 0.5*a*dt*dt; vp = v + a*dt; // Correction a_pred = acc(x, vp, t); v = vp + 0.5*(a_pred-a)*dt; t += dt;
--> What is the numerically measured order of this method for the nonlinear system considered in Exercise 5.3?
Now plot the energy error E(t) - E(0) as a function of time, for 0 < t < 1000. What do you notice about the long-term growth of the error? Compare this with the corresponding plot for the integrator used in Exercise 5.3.