A general method is presented to determine regular orbits in the prese
nce of irregular trajectories in phase space for a dynamical system of
n degrees of freedom. A cost functional is introduced with a control
field to guide the system towards regular orbits. Iteration of the opt
imizing algorithm naturally seeks out regular orbits with the control
field turned off. If the system is completely chaotic in some region,
the method chooses the best initial condition to achieve a nearly regu
lar orbit. An illustration is presented for n = 3 and n = 4 dimensiona
l dynamical systems.