I have been trying to prove that the following function is not uniformly continuous:
Consider $A=(0,\infty), B=(-\infty,0),$ and $f: A \cup B \rightarrow \mathbb{R}$ given by $$ f(x)=\left\{\begin{array}{ll} x+1 & x>0 \\ x-1 & x<0 \end{array}\right. $$
What have i tried so far?
To show that $f$ is not Uniformly continuos, I am going to show that there exists $\epsilon > 0$ such that, $\forall \delta > 0$ there exists $x, y \in A \cup B$ such that $$|x-y|<\delta$$ but $$|f(x)-f(y)| \geq \epsilon$$
Choose $\epsilon = 1$ and consider $\delta > 0$ given. By taking $y = x + \frac{\delta}{2}$ and $x > 0$ from which we get that: $$|x-y|<\delta$$
Now, $$|f(x) - f(y)| = |(x+1) - (x - \frac{\delta}{2})| $$ which equals $$1 + \frac{\delta}{2}$$
Now i am stuck. I want the last quantity to be greater than $\epsilon = 1$ but i cant assure that, since i have no control over the value of $\delta$.
Can someone help me? Something is just not right. I would appreciate feedback followed by a detailed solution, i am really struggling to prove a function is not uniformly continuous in general.
Thanks in advance, Lucas
Your computation looks wrong. Your $x$ and $y$ are both positive, so $f(x)=x+1$, and $f(y)=(x+\frac{\delta}{2})+1$. Thus $|f(x)-f(y)|=|(x+1)-(x+1+\frac{\delta}{2})|=\frac{\delta}{2}$. If $\delta$ is small then this will not be bigger than $1$.
Anyway, your choice of $x$ and $y$ will not work, because the function is uniformly continuous in both $A$ and $B$. What ruins uniform continuity in the union is when $x\in A$ and $y\in B$ or vice versa. So let $\delta>0$ and choose $x=\frac{\delta}{3}, y=-\frac{\delta}{3}$. Then $|x-y|<\delta$. However:
$|f(x)-f(y)|=|(\frac{\delta}{3}+1)-(-\frac{\delta}{3}-1)|=2+\frac{2\delta}{3}\geq 1=\epsilon$