Minimizing $E[f]$ and $E[1/f]$ for a function $f$ I have the set of all functions from $f:[0,1]\rightarrow [1-y,1+x]$. Where $x,y  \in \mathbb R^+$ and $1-y>0$. 
I want to find the function that maximises $min(E[f], E[1/f])$, with $E[\cdot  ]$ being expectation/average over $[0,1]$, i.e.
$$E[f] =\int_0^1 f(t)dt$$
I can solve the case where $f$ only has two values, it essentially comes down to $f(t)=1-y$ if $t<t_0$ and $f(t)=1+x$ otherwise. I'm pretty convinced, that this is indeed the solution, but have no idea how to prove this.
Side notes on $f$:
As mentioned in the example $f$ does not have to be continuous. However if your proof needs continuity or any other kind of smoothness it's fine, as they are dense in the set of functions. Furthermore I'm a biologist, so $f$ will not be anything really weird with an infinite amount of discontinuities etc. and can certainly be integrated.
 A: We have to find the maximum of
$$Q(f):=\min\bigl\{E(f),E(1/f)\bigr\}$$
over all $f:\>[0,1]\to[a,b]$, whereby $0<a<1<b$ are given and fixed.
I claim that whenever $E(f)\ne E(1/f)$ the value $Q(f)$ can be improved. Indeed: If $E(f)<E(1/f)$ and $f(x)\not\equiv b$ then we can enlarge $f(x)$ slightly at suitable $x\in[0,1]$, thereby increasing $E(f)$, but not violating $E(f)<E(1/f)$. The case $f(x)\equiv b$ is impossible, because it would imply $E(f)=b>1>{1\over b}=E(1/f)$. – Similarly, when $E(f)>E(1/f)$.
Write $f=e^g$. Then $E(f)=E(1/f)$ is equivalent to $$E(\sinh g)=0\ ,\tag{1}$$ and it remains to maximize
$$Q(f)={1\over2}\bigl(E(f)+E(1/f)\bigr)=E(\cosh g)$$
under the condition $(1)$. It seems intuitively obvious that we should make  $|g|$ as large on average as possible, all the while satisfying $(1)$. This means choosing
$$f_*(x)=a\quad(0\leq x<p),\qquad f_*(x)=b\quad (p<x\leq1)$$
(or some "measurewise equivalent" $f_*$), whereby $p$ and $q:=1-p$ are chosen such that
$$p a+ q b=p\>{1\over a}+q\>{1\over b},\qquad p+q=1\ .$$
This leads to
$$p={a(b^2-1)\over (b-a)(1+ab)},\qquad q={b(1-a^2)\over (b-a)(1+ab)}\ ,$$
so that
$$Q(f_*)=pa+qb={a+b\over1+ab}\ .$$
