In classical mechanics, action-angle variables are a set of canonical coordinates that are useful in characterizing the nature of commuting flows in integrable systems when the conserved energy level set is compact, and the commuting flows are complete. Action-angle variables are also important in obtaining the frequencies of oscillatory or rotational motion without solving the equations of motion. They only exist, providing a key characterization of the dynamics, when the system is completely integrable, i.e., the number of independent Poisson commuting invariants is maximal and the conserved energy surface is compact. This is usually of practical calculational value when the Hamilton–Jacobi equation is completely separable, and the separation constants can be solved for, as functions on the phase space. Action-angle variables define a foliation by invariant Lagrangian tori because the flows induced by the Poisson commuting invariants remain within their joint level sets, while the compactness of the energy level set implies they are tori. The angle variables provide coordinates on the leaves in which the commuting flows are linear.