TITLE: Find the value of $\sup \int_a^b \max\{f,g\}$
QUESTION [6 upvotes]: Assume $a$ and $b$ are real numbers such that $0<a<b$, and let $\textsf{K}_{a,b}$ the set of all non-negative, monotonically decreasing functions $f$ satisfying $$\int_a^b f(t) dt=1$$ and that $af(a)=bf(b)$ on the interval $[a,b]$. 
Find the value of
$$\sup \left\{ \int_a^b\max\{f(t),g(t)\}dt \, : \, f,g\in \textsf{K}_{a,b} \right\}$$
Em, I basically have no idea. How to deal with the $\max$ function? Using inequality? I don't know... 
Somehow it looks like a variational problem? Everything is thankful.

REPLY [2 votes]: From $f(b) \leq f(t) \leq f(a)$ and $f(b) = af(a)/b$, we get the inequality:
$$f(a)\frac{a(b-a)}{b} =\int_a^bf(b)dt \leq \int_a^b f(t)dt = 1 \leq \int_a^bf(a)dt = f(a)(b-a.)$$
Therefore:
$$ m = \frac{1}{b-a} \leq f(a) \leq \frac{b}{a(b-a)} = M.$$
Here's a rough argument given this:
To maximize the integral of the max function, we want two functions with masses distributed with minimal overlap. So let's take $f(x) = M$ for $ b \leq x \leq x_0$ where $x_0 $ is such that $(x_0-a)M = 1$ and $0 $ after that point.
On the other hand, let us take $g(x) = m$. Then:
$$\int_b^a \max\{f,g\}dt = \int_b^{x_0} fdt + \int_{x_0}^a gdt = 1+ (b-x_0)(b-a)$$