Dual time integration: tracking the physical time
The dual time integrator needs to track and update the physical time so we can solve inhomogeneous equations where RHS is a function of both the state vector and time. For the BDF methods the time fed to the RHS must be t^n+1 , the time at the end of the step (where we try to equate the RHS and discretized time derivative).
I have an exact solution to an inhomogeneous ODE for verification and a Matlab script for comparison.