Prove that $f(x)$ is uniformly continuous both on the intervals $[−1,0)$ and $(0, 1]$, but is not uniformly continuous on the set $[−1, 0) \cup (0, 1]$, where $$f(x) = \frac{x^2 + 5x}{|x|}.$$
My approach was to prove by Lipschitz. For
$$\left|\dfrac{X_1^2 + 5X_1}{|X_1|} - \dfrac{X_2^2 + 5X_2}{|X_2|}\right|,$$
I think that there are three cases:
- when $|X_1|$ and $|X_2|$ are both positive,
- both negative,
- one of them is positive.
So
$$\left|\dfrac{X_1^2 + 5X_1}{|X_1|} - \dfrac{X_2^2 + 5X_2}{|X_2|}\right| = \left|\dfrac{X_2X_1^2 - X_1X_2^2}{X_1X_2}\right| \leq |X_1 - X_2| \to M = 1$$ is Lipschitz, and this was for case 1.
Am I on the right path? Should I continue in this way?
Hint: your case analysis should be on the signs of $X_1$ and $X_2$ not $|X_1|$ and $|X_2|$ (which are both non-negative). In $[-1, 0)$ you know you are in case 2 and in $(0, 1]$ you know you are in case 1. In both these cases, you are on the right path. In $[-1, 0) \cup (0, 1]$ you can be in case 3 and then things go wrong because, for small $x > 0$, $((-x)^2 + 5(-x))/|x|$ will be very close to $-5$, while $(x^2 + 5x)/|x|$ will be very close to $5$. So the one-size-fits-all requirement of uniform continuity won't be satisfiable.