@ Paolo90:
1. Ok.
Here's an alternative proof of the leftmost inequality.
Testo nascosto, fai click qui per vederlo
Let $G(x):=1-g(x)$. Obviously, $0\leq G(x)\leq 1$ therefore the rightmost inequality applies to $f$ and $G$ and it yields:
\[
\tag{1}
\int_a^b f(x)\ G(x)\ \text{d} x \leq \int_a^{a+\Gamma} f(x)\ \text{d} x
\]
with $\Gamma = \int_a^b G(x)\ \text{d} x$.
Using some algebra we find:
\[
\begin{split}
a+\Gamma &= a+\int_a^b (1-g(x))\ \text{d} x \\
&= a+(b-a)-\int_a^b g(x)\ \text{d} x \\
&= b-\int_a^b g(x)\ \text{d} x \\
&= b-\gamma\; ,
\end{split}
\]
with $\gamma = \int_a^b g(x)\ \text{d} x$, and:
\[
\begin{split}
\int_a^b f(x)\ G(x)\ \text{d} x &= \int_a^b f(x)\ (1-g(x))\ \text{d} x \\
&= \int_a^b f(x)\ \text{d} x - \int_a^b f(x)\ g(x)\text{d} x\; ;
\end{split}
\]
hence (1) rewrites:
\[
\int_a^b f(x)\ \text{d} x - \int_a^b f(x)\ g(x)\text{d} x \leq \int_a^{b-\gamma} f(x)\ \text{d} x
\]
or finally:
\[
\int_a^b f(x)\ g(x)\text{d} x \geq \int_{b-\gamma}^b f(x)\ \text{d} x
\]
which is the claim.
2. Correct.
3. Your idea is the right one. Follow it.
Neverthless, one can give an alternative proof (which does not make use of approximation) on the following lines:
Testo nascosto, fai click qui per vederlo
Let $f\in L^1(a,b)$ and $g\in L^\infty(a,b)$ satisfy the assumptions; w.l.o.g., we can assume $f$ and $g$ be defined and finite everywhere in $]a,b[$.
Then (in what follows $\text{d} x$ stands for the Lebesgue measure):
\[
\begin{split}
\int_a^{a+\gamma} f(x)\ g(x)\ \text{d} x - \int_a^b f(x)\ g(x)\ \text{d} x &= \int_a^{a+\gamma} f(x)\ g(x)\ \text{d} x - \int_a^{a+\gamma} f(x)\ g(x)\ \text{d} x \\
&\phantom{=}- \int_{a+\gamma}^b f(x)\ g(x)\ \text{d} x\\
&= \int_a^{a+\gamma} f(x)\ (1-g(x))\ \text{d} x - \int_{a+\gamma}^b f(x)\ g(x)\ \text{d} x\\
&\geq f(a+\gamma)\ \int_a^{a+\gamma} (1-g(x))\ \text{d} x - \int_{a+\gamma}^b f(x)\ g(x)\ \text{d} x\\
&= f(a+\gamma)\ \left( \gamma - \int_a^{a+\gamma} g(x)\ \text{d} x\right) \\
&\phantom{=}- \int_{a+\gamma}^b f(x)\ g(x)\ \text{d} x\\
&= f(a+\gamma)\ \left( \int_a^b g(x)\ \text{d} x - \int_a^{a+\gamma} g(x)\ \text{d} x\right) \\
&\phantom{=}- \int_{a+\gamma}^b f(x)\ g(x)\ \text{d} x\\
&= f(a+\gamma)\ \int_{a+\gamma}^b g(x)\ \text{d} x - \int_{a+\gamma}^b f(x)\ g(x)\ \text{d} x\\
&= \int_{a+\gamma}^b (f(a+\gamma) -f(x))\ g(x)\ \text{d} x\\
&\geq 0\; ,
\end{split}
\]
which is the leftmost inequality to be proved.
The righmost inequality may be proved using the argument above.
***
@ Rigel:
4. The alternative proof given above implies that the assumption $f(x)\geq 0$ is not necessary to our inequalities to hold.
***
Exercise:
5. One can easily see that both inequalities (
S) become equalities simultaneously when $g(x)=0$ or $g(x)=1$ for any fixed $f$.
Find a function $\hat{f}$ such that the converse is not true.
In other words, find $\hat{f}$ in such a way that there exists a function $\hat{g}$, which is neither identically zero nor identically one, such that both inequalities (
S) become equalities.
Hint:
Testo nascosto, fai click qui per vederlo
What happens if $\hat{f}$ is symmetric with respect to $\frac{a+b}{2}$?
6 (Open question, at least for me). In general, is it possible to characterize the simultaneous equality case in both (
S)?
I.e., is it possible to find all the functions $g$ such that (
S) becomes a chain of equalities for any $f$?
Sono sempre stato, e mi ritengo ancora un dilettante. Cioè una persona che si diletta, che cerca sempre di provare piacere e di regalare il piacere agli altri, che scopre ogni volta quello che fa come se fosse la prima volta. (Freak Antoni)