What an idiot. The domain of f is obviously [-2, 4).