Optimal singular rocket and aircraft trajectories