In-class exercise 5.4

Repeat Exercise 5.1 for the predictor-corrector integration scheme obtained by including the "jerk" (derivative of the acceleration) term numerically in the velocity step:
	// 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.