Understanding a proof that, if $|a-1|+|b-1|=|a|+|b|=|a+1|+|b+1|$, then the minimum value of $|a-b|$, over distinct reals $a$ and $b$, is $2$.

absolute valuealgebra-precalculusfunctionsreference-works

I saw this epic question in Advanced Problems in Mathematics by Vikas Gupta:

If $$|a-1|+|b-1|=|a|+|b|=|a+1|+|b+1|$$ then find the minimum value of $|a-b|$, where $a$ and $b$ are distinct real numbers.

My Solution:

enter image description here

So my answer is correct, and I happily turned to the solution page to see what the author has written, and here's the MINDBLOWING solution I found:

enter image description here

Despite reading the solution many times, I'm still unable to understand what was the motivation behind taking $f(x)=|x-a|+|x-b|$ and supposing $a>b$. Also on what basis did he write $f(0)=f(1)=(-1)$ and the remaining steps.

Could you please explain the motivation behind each step written by the author? Any help would be appreciated. Thanks!

EDIT: I also wanted to add, if you guys know any better ways than the 2 ways given posted by me, I would love to know that as well:)

Best Answer

There is a big error in the last steps of the shorter proof, and a mild gap.

First, the motivation.

Intuitively, this is a question about the so-called taxicab distance. The taxicab distance between $(a,b)$ and $(x,y)$ is $$|x-a|+|y-b|.$$

$|a|+|b|,$ $|a-1|+|b-1|$ and $|a+1|+|b+1|$ are the distances between $(a,b)$ and $(1,1),$ $(0,0),$ and $(-1,-1),$ respectively. And $|a-b|$ is the shortest distance from $(a,b)$ to the line $y=x.$

So everything about this seems to be about the taxicab distances between $(a,b)$ and points $(x,x).$

So it is natural to define the distance from $(a,b)$ to $(x,x)$:

$$f(x)=|a-x|+|b-x|$$

and try to learn about this function.


The big error in the given proof is the last two lines. The statement $b\leq-1\leq a\leq 1$ is wrong.

It should be $$b\leq-1<1\leq a,\tag1$$ and thus $a-b=|a-b|\geq 2.$

The reason for $(1)$ is the skipped step.

$f(x)$ is strictly decreasing when $x<b$ and strictly increasing when $x>a,$ and so the only way three distinct values $u,v,w$ have $f(u)=f(v)=f(w)$ is for the three values to be in $[b,a].$

But we know $f(0)=f(-1)=f(1),$ so $0,1,-1\in[b,a].$

The "shape" of $f$ is the key. We want to show that $f^{-1}(d)$ has at most two points for any $d>|a-b|,$ and for that you need to know not just that $f$ is constant on $[b,a],$ but that the functions is strictly decreasing on $(-\infty,b)$ and strictly increasing on $(a,+\infty).$


So we get a stronger result:

If $u<v<w$ and $f(u)=f(v)=f(w),$ then $|a-b|\geq w-u.$


Picking $a>b$ is possible because the question is symmetric. You could theoretically prove it in two cases, $a>b$ and $b>a,$ but the second case would be exactly the same, with $a,b$ reversed. So we often do only the first case if it is obvious the second case is exactly the same.

Mathematicians will often say things like "Without loss of generality, we can assume $a>b.$" This usually means that we are proving for some subset of cases, but we can easily get the general case back from this subset.

Related Question