If $[a,b]$ is an interval of minimal length with $\int_a^bf(x)dx=\alpha$ then $f(a)=f(b)$ 
Suppose $f$ is a real positive continuous function on $\mathbb{R}$ with $\int_{-\infty}^{\infty}f(x)dx=1$. Let $0<\alpha<1$, and suppose $[a,b]$ is an interval of minimal length with $\int_a^bf(x)dx=\alpha$. Show that $f(a)=f(b)$.

I have a lot of difficulty from the resolution. Is there someone who could give me a helping hand?
 A: Let $m$ be the length of the minimal interval. Consider
$$g(x):=\int_{x}^{x+m}f(y)dy.$$
Since $m$ is minimal we have $g(x)\le \alpha$ for all $x\in\mathbb R$. So $a$ is a local maximum of $g$ and hence $g'(a)=0$. Using the fundamental theorem of calculus we get
$$g'(x)=f(x+m)-f(x).$$
For $x=a$ this gives us $f(a)=f(b)$.
A: We want $g(x,y):=y-x$ minimal under the constraint $\int_x^y f(t)\>dt=\alpha$. Set up Lagrange's function
$$\Phi(x,y,\lambda):=y-x-\lambda\int_x^y f(t)\>dt$$
and deduce that at all local minima we have
$$0=\Phi_x=-1+\lambda f(x),\qquad 0=\Phi_y=1-\lambda f(y)$$
and therefore $f(x)=f(y)$.
A: Hint: Assume that $f(a)\ne f(b)$, such as $f(a)<f(b)$. Then slightly adjust $a$ and $b$ so you get the same value for the integral $\int_a^b f(x)\,dx$, and $a$ and $b$ are closer to each other than they were.
You may want to use the formula for the derivative of $\int_{g(t)}^{h(t)}f(x)\,dx$.
A: Suppose $f(a) < f(b)$ ($f(a) > f(b)$ is analogous). Since $f$ is continuous, there is an $\varepsilon > 0$ with $f(x) < \frac{f(a) + f(b)}2$ for all $x$ that satisfy $|x-a| < \varepsilon$. Similarly, there exists a $\delta > 0$ with $f(x) > \frac{f(a) + f(b)}2$ for $|x-b| < \delta$. Let:
$$I = \int_{a+\varepsilon}^{b+\delta} f(x) dx$$
Now there can be three cases:


*

*$I = \alpha$: Define $a' = a + \varepsilon$ and $b' = b+ \delta$.

*$I < \alpha$: Defnie $b' = b + \delta$. By intermediate value theorem, there is a number $a' \in (a, a+\varepsilon)$ with $\int_{a'}^{b'}f(x)dx = \alpha$. 

*$I > \alpha$: Define $a' = a + \varepsilon$. By intermediate value theorem, there is a number $b' \in (b, b+\delta)$ with $\int_{a'}^{b'}f(x)dx = \alpha$.


Now we have $\int_{a'}^{b'}f(x)dx = \alpha$ and:
$$0 = \alpha - \alpha = \int_{a}^{b}f(x)dx - \int_{a'}^{b'}f(x)dx = \int_a^{a'}f(x) dx - \int_b^{b'}f(x) dx$$ $$\Rightarrow \int_a^{a'} f(x) dx = \int_{b}^{b'} f(x) dx$$
Let $m = \max_{x \in [a,a']}f(x)$ and $M = \min_{x \in [b,b']}f(x)$.
$$M(b'-b) \leq \int_b^{b'}f(x) dx = \int_a^{a'}f(x) dx \leq m(a'-a) \Rightarrow b'-b \leq \frac{m}{M}(a'-a) < a'-a$$
So $b' - a' = b' - b + b - a' < a' - a + b - a' = b - a$. Thats a contradiction since $[a,b]$ was the shortest interval with the given value of the integral.
