Sunday, June 17, 2012

Zero crossing

During the past week Jan has implemented event detection using first-order interval polynomial arithmetic. For the purpose of simulating hybrid ODEs it is necessary to determine when an event must have happened and when an event may have happened in a given time interval. Below follow two plots showing zero-crossing detection for solutions to the ODE 

x'' = -10, x'(0) = 0, x(0) = 5 for times in [0,2] 

where the solution is computed with a uniform step size of 0.2. In the following plot solving is halted when there is certainty that the solution must have crossed zero somewhere in the last time step.  


and in the following plot solving is halted when there is a possibility that the solution may have crossed zero somewhere in the last time step.