Derivations, foliations and first integrals

Given a distribution on a projective variety, we will study the problem of finding a tangent foliation by curves with the same field of first integrals.