Find the domain of a function