Quasiprobability methods for nonlinear chemical and optical systems