Split up the domain of the function.