Determine the value of $\mathbb{E}[X]\mathbb{E}[1/X]$ with $X$ a random variable such that $0
Let b>a>0, determine the set
$$\{\mathbb{E}[X]\mathbb{E}[1/X]\colon X \ \text{is a random variable and } X(\omega)\in[a,b],\ \forall \omega\in\Omega  \}$$
It is clear that we have $$\mathbb{E}[X]\mathbb{E}[1/X]\geq \big(\mathbb{E}[\sqrt{X}\sqrt{1/X}]\big)^2=1$$ by the Cauchy-Schwarz
inequality, but I have no idea about how to determine
the upper bound of the product, any help would be appreciated
.
 A: The answer is $\frac{(a+b)^2}{4ab}$ by taking $X$ half probability $a$ and half probability $b$.
We sample $X_1,X_2,\dots,X_n$ i.i.d. with $X$. Let $Y=\frac{1}{n^2}(\sum_{i=1}^n X)(\sum_{i=1}^n 1/X)$. Let $n\to\infty$ so we can get $Y\to \mathbb{E}(X)\mathbb{E}(1/X)$ in probability. Now we prove that $Y\le \frac{(a+b)^2}{4ab}$ always holds, and this can yield the desired result because of the convergence. Without loss of generality, we assume that $n$ is even.
Now we fix $X_2,\dots,X_n$ and make $X_1$ variable. We can write
$$Y=(\sum_{i=1}^n X_i)(\sum_{i=1}^n 1/X_i)=AX_1+B/X_1+C$$
Where $A,B,C$ are expressions of other variables ($X_2,\dots, X_n$). This takes the maximum when $X_1$ hits the wall, that is, $X_1$ is either $a$ or $b$. So, we merge $x$ into one of $u$ $a$'s or $v$ $b$'s. Now, all of them are $a$ or $b$, and assume $u$ and $v$ are number of $a$ and $b$ again. So, we have
$$Y=\frac{1}{n^2}(\sum_{i=1}^n X)(\sum_{i=1}^n 1/X)=\frac{1}{n^2}(ua+vb)(\frac ua+\frac vb)=\frac{1}{n^2}(u^2+v^2+uv(a/b+b/a))=1+\frac{uv}{n^2}(a/b+b/a-2)$$
Here, $uv$ is maximized when $u=v=n/2$. So we have
$$Y=1+\frac{uv}{n^2}(a/b+b/a-2)\le 1+\frac{(n/2)^2}{n^2}(a/b+b/a-2)=1+\frac{a^2+b^2-2ab}{4}=\frac{(a+b)^2}4$$
