We give an effective sufficient condition for a variational problem with
infinite horizon on a compact Riemannian manifold M to admit a smooth optimal
synthesis, i. e. a smooth dynamical system on M whose positive
semi-trajectories are solutions to the problem. To realize the synthesis we
construct a well-projected to M invariant Lagrange submanifold of the
extremals' flow in the cotangent bundle T*M. The construction uses the
curvature of the flow in the cotangent bundle and some ideas of hyperbolic
dynamics