Let and be the computed solution at . The TR substep goes from to via
The BDF2 substep goes from to via
The constant multiplying the truncation error is minimized if . This value of gamma also produces identical jacobians for both the TR and BDF2 steps.
The local truncation error (LTE) can be used to estimate a reasonable next time step. One approach is to use the divided difference formula
is used to estimate the LTE. Note that C is the constant multiplying the highest order truncation term in the method
The LTE is compared to an allowable error tolerance to produce a RMS measure of the normalized pointwise error. Let
and
Then, the RMS measure of the normalized pointwise error is given by
A candidate next time step is chosen as
If r is reasonably small (say less than 2), the error in the timestep is assumed to be acceptable and the next time step is chosen to be . The 2 times cap on increases is to avoid stepsize oscillations. If r is too large, the current timestep is repeated with .
A second timestep estimator is based on a LTE estimate computed using a Milne's device. A second TR step is taken from to . The solutions of the BDF2 step and the second TR step are compared and used to estimate the truncation error. See [4] for more details.