Abstract Two numerical computational techniques are presented for improvement of the stable-manifold method, which is effective for nonlinear optimal control. The first technique is for generation of points on the stable manifold in a robust way against numerical errors. There, a special numerical method that preserves Hamiltonian is used to solve a differential equation sensitive to numerical errors. The second technique is a sort of shooting method to generate a point corresponding to the desired system state. Again, numerical robustness is an issue there. The two techniques are applied to an example system and shown to be effective.