Evaluating functions and finding the domain