First and invariant integrals in stability problems