The domain is the union of all of the "if" parts of the function definition. These are telling you where the function is defined, which is what the domain is.
... (-∞, -2] ∪ (-2, ∞) = (-∞, ∞)
8.7m questions
11.3m answers