Most codes for the initial-value problem (IVP) y′ = f ( x , y ) , a ≤ x ≤ b , y ( a ) = y a , y ∈ &RR; n provide approximations for y ( x ) and y′ ( x ) at a discrete set of points a = x 0 < x 1 < .... Now assume that certain algebraic functions, called event functions, of the solution of the IVP are specified: g j ( x , y ( x ) , y′ x ) ) , j = 1 ,..., m. An event j is said to occur at a point t s if t s is a root of g j. The problem addressed here is the location of such points.
The authors consider two event functions, g j ( x , y , y′ ) = y k j ( x ) - &agr; j and g j ( x ) = y′ k j ( x ), for finding where a component of the solution y k j ( x ) assumes a given value and where it has an extremum; several event functions of both forms are allowed at the same time. Some codes provide a polynomial approximation for y ( x ) on [ x i , x i + 1 ] To locate an event j, it then seems natural to compute the first root of g j ( x , p ( x ) , p′ ( x ) ). A key idea employed in the authors’ root finding algorithm is that if y ( x ) is approximated by a polynomial p ( x ), then for the special event functions considered, g j ( x , p ( x ) , p′ ( x ) ) is itself a polynomial.
The authors discuss theoretical and practical difficulties associated with the event location problem and how their code overcomes some of these. They outline an approach to finding all the event locations for the above two special event functions associated with the IVP. The code provides two modules. The first checks whether ( x i , x i + 1 ] contains any events. The second locates the first event in a user-specified interval ( c , d ] ⊂ ( x i , x i + 1 ] after a call to the first module has determined that one or more events do occur in ( x i , x i + 1 ].
This paper is a detailed description of the authors’ experience with the construction of their event locator code. It explains how the code is grafted onto a standard integrator for the IVP. The authors have documented the code itself in a previous paper [1].