A constructive version of the Frobenius integrability theorem -- that can be
programmed effectively -- is given. This is used in computing invariants of
groups of low ranks and recover examples from a recent paper of Boyko, Patera
and Popoyvich \cite{BPP}