Text this: Construction of Lyapunov functions from first integrals for stochastic stability analysis.