# What is the supremum, infimum, maximum and minimum of the set $B:=\{x \in\mathbb{R}, \left||x-1|-|x-2|\right|<1\}$?

What is the supremum, infimum, maximum and minimum of the set $$B:=\{x \in\mathbb{R}, \left|\left|x-1\right|-\left|x-2\right|\right|<1 \}?$$

I am not sure how to find any of them. I thought I have to find for which values is the equation right and then from the values I could have some interval for which I could say what is the min, max, sup and inf.. But whatever I put for $$x$$ I get that $$1 < 1$$.

• $B=(1,2)$. It has no max nor min. Jul 26, 2020 at 9:00

A good place to start, at least for an intuitive grasp of the matter, would be to graph $$f(x) = ||x-1| - |x-2||$$ and $$g(x)=1$$, and see whenever $$f$$ is below $$g$$. Doing so, we see that, indeed, $$f(x) = 1$$ for all $$x$$, except on a particular interval: For $$x\in (1,2)$$, $$f(x) \ne 1$$ (you can show this algebraically if you choose$$^{(1)}$$), and this gives you an idea of what your set actually looks like. Namely, the graph suggests your set is equivalent to $$(1,2)$$, and deriving the quantities you desire becomes easier.

$$(1)$$: Showing This Algebraically:

To show $$f(x) = 1$$ for all $$x$$ outside $$(1,2)$$, consider two cases: $$x\le 1$$ and $$x\ge2$$.

• In the former, then $$|x-1| = 1-x$$ and $$|x-2| = 2-x$$. Then $$f(x) = |1-x-(2-x)| = 1$$.
• In the latter case, $$|x-1| = x-1$$ and $$|x-2| = x-2$$. Then $$f(x) = |x-1-(x-2)| = 1$$.

On the other hand, if $$x \in (1,2)$$, i.e. $$1 < x < 2$$, then $$|x-1| = x-1$$ but $$|x-2|=2-x$$. Then $$f(x) = |x-1-(2-x)| = |2x-1|$$ which is clearly not always equal to $$1$$.

• Nice answer (+1). Jul 26, 2020 at 8:21

If $$x \le 1$$ then $$|1-x + x - 2|\lt 1 \implies 1 \lt 1$$Which is a contradiction. If $$1\lt x \le 2$$ then $$|x-1 + x - 2| \lt 1 \implies 1 \lt x \lt 2$$And if $$x\gt 2$$ then $$|x - 1 - x + 2| \lt 1 \implies 1 \lt 1$$ So the answer is $$A = \{x \in \mathbb{R} | 1\lt x \lt2\}$$. I think you can find the values that you've mentioned then.