Analysing Differential Equations with Uncertainties via the Liouville-Gibbs Theorem: Theory and Applications