Ordinary differential equations that model technical systems often contain states, that are considered dangerous for the system. A trajectory that reaches such a state usually indicates a flaw in the design. In this paper, we present and study the properties of an algorithm for finding such trajectories. That is, for a given ordinary differential equation, the algorithm finds a trajectory that originates in one set of states and reaches another one. The algorithm is based on sequential quadratic programming applied to a regularized optimization problem obtained by multiple shooting.