Find distribution that minimises a function of its moments Imagine a probability density function $f(x)$, defined for positive $x$, and let's note its $n$th non-centred moment $x_{n}$. The mean $x_{1}$ is fixed (and positive). 
How can I find $f(x)$ that minimises some given function of its moments? In my case, $$\frac{  x_{3}+x_{1}^{3}-2x_{1}x_{2}  }{  (x_{2}-x_{1}^{2})^{2}  }$$
I tried to take the Gateaux derivative of that expression in the direction of a test function $h(x)$, and setting the result to be zero for any $h(x)$. In the end, I find a relation involving a few moments of $f(x)$ and the variable $x$, which makes no sense. Would you have any idea of the correct approach here?
Many thanks! 
 A: Let $X$ be a positive random variable (r.v.) with probability density function $f$. The exact lower bound on 
$$r(X):=\frac{x_3+x_1^3-2x_1x_2}{(x_2-x_1^2)^2}$$
is $0$, and it is not attained at any $f$. 
Indeed, by the Cauchi--Schwarz inequality, $x_2\le x_3^{1/2}x_1^{1/2}$, and $x_2=x_3^{1/2}x_1^{1/2}$ only if the r.v. $X$ is a constant. Since $X$ has a pdf $f$, it is not discrete and hence not a constant. So, $x_2<x_3^{1/2}x_1^{1/2}$ and hence
$$x_3+x_1^3-2x_1x_2>x_3+x_1^3-2x_1x_3^{1/2}x_1^{1/2}=(x_3^{1/2}-x_1^{3/2})^2\ge0.$$ 
So, $$r(X)>0.$$ 
Note also that, for any real $t$ and any natural $k$, if we replace $X$ by $tX$, then $x_k$ gets replaced by $t^k x_k$. So, 
$$r(tX)=\frac{t^3}{t^4}\,r(X)=\frac{r(X)}t\to0$$
as $t\to\infty$. 
Therefore and because $r(X)>0$, we see that indeed the exact lower bound on 
$r(X)$
is $0$, and it is not attained at any $f$. 
A: This is to complete Mateusz Kwaśnicki's answer by proving that 
$$EY^2(1+Y)\ge(EY^2)^2\tag{1}$$
if $Y\ge-1$ and $EY=0$. 
Since $Y\ge-1$, for any real $v$ we have
\begin{align}
Y^3=(Y+1)(Y-v)^2&+(2v-1)Y^2+(2v-v^2)Y-v^2 \\
&\ge (2v-1)Y^2+(2v-v^2)Y-v^2.
\end{align}
So, choosing now $v=EY^2$, we have 
$$EY^3
\ge (2v-1)EY^2+(2v-v^2)EY-v^2
=(2v-1)v+(2v-v^2)0-v^2=v^2-v,
$$
so that $EY^3
\ge v^2-v$, which is equivalent to (1). 
A: (This is not an answer, rather an extended comment.)
If $X = a \frac{n}{n-1}$ with probability $\frac{n-1}{n}$ and $X = 0$ otherwise, then $x_1 = \mathbb{E}X = a$, $x_2 = \mathbb{E}X^2 = a^2 \frac{n}{n-1}$ and $x_3 = \mathbb{E}X^3 = a^3 (\frac{n}{n-1})^2$, so that $$\frac{x_3 + x_1^3 - 2 x_1 x_2}{(x_2 - x_1^2)^2} = \frac{1}{a} .$$
Of course, one can smooth out $X$ a little bit to get an absolutely continuous distribution with the above ratio arbitrarily close to $\frac{1}{a}$.

My guess would be that $\dfrac{1}{a}$ is the lower bound for $\dfrac{x_3 + x_1^3 - 2 x_1 x_2}{(x_2 - x_1^2)^2}$ if $x_1$ is required to be equal to $a$.

Let $X$ have density function $f(x)$, and let $Y = X/a - 1$, so that $Y \geqslant -1$ and $\mathbb{E} Y = 0$ (recall that we assume that $x_1 = a$). Observe that 
$$x_3 + x_1^3 - 2 x_1 x_2 = \mathbb{E}(X^3 + a^3 - 2 a X^2) = a^3 \mathbb{E}(Y^2 + Y^3)$$
and
$$ x_2 - x_1^2 = \mathbb{E}(X^2 - a^2) = a^2 \mathbb{E} Y^2 . $$
Thus,
$$ \frac{x_3 + x_1^3 - 2 x_1 x_2}{(x_2 - x_1^2)^2} - \frac{1}{a} = \frac{1}{a} \, \frac{\mathbb{E}Y^2 + \mathbb{E}Y^3}{(\mathbb{E}Y^2)^2} - \frac{1}{a} = \frac{1}{a} \, \frac{\mathbb{E}(Y^2 (1 + Y)) - (\mathbb{E}Y^2)^2}{(\mathbb{E}Y^2)^2} . $$
My guess is therefore equivalent to
$$ \mathbb{E}(Y^2 (1 + Y)) \geqslant (\mathbb{E}Y^2)^2 $$
whenever $\mathbb{E} Y = 0$ and $Y \geqslant -1$.
I do not an immediate proof of the above inequality, nor do I see a counter-example. I though I would share it anyway, perhaps someone else can help. Edit: the proof is completed in Iosif Pinesis's answer.
