# $f,g \in [0,1] \times [0,1]$, $\int f - g \mathrm{d}x = 0$ and are monotonically increasing, then $\int |f-g| \mathrm{d}x \le \frac{1}{2}$

$$f,g$$ are monotonically increasing in $$[0,1]$$ and $$0\le f , g \le 1$$. $$\int_0^1 f - g \mathrm{d}x = 0$$. Prove that

$$\int_0^1 |f - g|\mathrm{d}x \le \frac{1}{2}$$

In my previous question, $$g(x) = x$$. And my teacher said $$x$$ can be replaced by $$g(x)$$. In fact, in previous question, we don't need to use the condition $$\int_0^1 f - g \mathrm{d}x = 0$$. But if we replace $$x$$ with $$g$$, this condition becomes necessary.

Also, if $$g = x$$, we can replace the $$\frac{1}{2}$$ with $$\frac{1}{4}$$,that is

$$\int_0^1|f-g| \mathrm{d}x \le \frac{1}{4}$$ I am wondering how to prove that.

Let $$f=\mathbf1_{[\frac12,1]}$$, $$g=\frac12$$, then $$\int|f-g|=\frac12$$. Except for swapping $$f,g$$, this is the only case to reach the maximum.

We can decompose $$f-g=(f-g)^+-(f-g)^-$$ where $$h^+=\max(0,h),h^-=-\min(h,0)$$. So $$\int (f-g)^+=\int(f-g)^-$$.

$$f,g$$ is monotone means $$f-g$$ has bounded variation, in particular $$V(f-g)\le V(f)+V(g)\le2$$.

So $$\sup(f-g)^++\sup(f-g)^-\le1$$. To see we can assume $$f(0)=g(0)=0,f(1)=g(1)=1$$ since we don't assume $$f,g$$ to be continuous. And for simplicity assume supermum can be taken, say $$f(a)-g(a)=\max(f-g)$$, $$f(b)-g(b)=\min(f-g)$$.

Assume $$a otherwise swap $$f,g$$. Then $$V(f-g)=V_0^a(f-g)+V_a^b(f-g)+V_b^1(f-g)\ge(\max-0)+(\max-\min)+(0-\min)=2(\max-\min)=\sup(f-g)^++\sup(f-g)^-$$.

Then use $$\int|f-g|=\int_{(f>g)}(f-g)^++\int_{(fg)}(f-g)^+=:2I$$.

And we have $$I\le m(f>g)\cdot\sup(f-g)$$, $$I\le m(f with $$m(f>g)+m(f, $$\sup(f-g)+\sup(g-f)\le1$$.

If $$I>\frac14$$, $$m(f>g)\sup(f-g)\ge I$$, then $$m(fg))(1-\max(f-g))\le1+m(f>g)\sup(f-g)-(m(f>g)+\sup(f-g))\le 1+I-2\sqrt I=(1-\sqrt I)^2, contradiction.

• $f, g$ having values in $[0,1]$ means $V(f-g)\leq2$. What if $f$ goes from $0$ to $1$ on $[0,\frac12]$, and $g$ goes from $0$ to $1$ on $[\frac12,1]$? Then $f-g$ goes from $0$ to $1$ and back to $0$. – Arthur Apr 17 at 5:22
• @Arthur Sure, I would think about it. – yaoliding Apr 17 at 5:37
• what is $h$ here? – Masacroso Apr 17 at 5:47
• @Masacroso Just refer to an arbitrary function. I don't want to abuse the notation – yaoliding Apr 17 at 5:49
• I can't really understand the last paragraph. What's the contradiction. – X.T Chen Apr 17 at 5:57