Show that $f(x)+f(y) \leq g(x,y)$

I need to show that $f(x)+f(y) \leq g(x,y)$ if $x \neq y$, where $g(x,y)=1/|x-y|$ and $$f(x) = 2-2|2x-1|.$$ I have demonstrated the inequality in te following cases: $ y<-x$ or $y>2-x$ or $y>1+x$ or $y<-1+x$. In that cases we have that $f(x)+f(y) \leq 0$.

enter image description here

But I am stuck in show it in the general case. Any assistance in showing this would be appreciated.


Solution 1:

If $x\ne y,$ let $d=|x-y|.$ Then $d>0$ so $$g(x,y)-f(x)-f(y)=-4+\frac 1 d +2\cdot(|2x-1|+|1-2y|)\ge$$ $$\ge -4+\frac 1 d +2\cdot |(2x-1)+(1-2y)|=$$ $$=-4+\frac 1 d +2\cdot |2x-2y|=$$ $$=-4+\frac 1 d +4d=$$ $$=\left(2\sqrt d -\sqrt {1/d}\;\right)^2\ge 0.$$

Solution 2:

With the substitution $x=u+1/2$, $y=v+1/2$, the inequality becomes $$ 4 - 4|u| - 4 |v| \le \frac{1}{|u-v|} $$ or $$ |u-v| \bigl(1-|u|-|v|\bigr) \le \frac 14 $$ and that is true because $$ |u-v| \bigl(1-|u|-|v|\bigr) \underset{(1)}{\le} |u-v| \bigl(1-|u-v|\bigr) \underset{(2)}{\le} \frac 14 \, . $$ $(1)$ holds because of the triangle inequality, and $(2)$ holds because $x(1-x) \le 1/4$ for all real numbers $x$.

Solution 3:

Here are all cases. WLOG you can assume $y\lt x$, so $g(x,y)=1/(x-y)$. If $y>1/2$, then $x>1/2$ and $f(x)=4-4x$, $f(y)=4-4y$, so $f(x)+f(y)=8-4x-4y$, and you need to prove that $8-4x-4y\le 1/(x-y)$ or $8(x-y)\le 4(x^2-y^2)+1$. Dividing by $4$, we get $2x-2y\le x^2-y^2+1/4$ or $0\le (x^2-2x)-y^2+2y+1/4$ or $(x-1)^2-(y-1)^2+1/4\ge 0$ which is true since $y<x$.

If $y\le 1/2$ and $x\ge 1/2$, we have $f(x)=4-4x, f(y)=4y-4$ and you need to prove that $4y-4x\le 1/(x-y)$ which is true since $x>y$.

Finally if $y<1/2, x<1/2$ then $f(x)+f(y)=4x+4y-8<0$, and again $f(x)+f(y)<1/(x-y)$ because $x>y$.