For f satisfying $\int_\mathbb{R}f(x)dx=M,\int_\mathbb{R}xf(x)dx=0,\int_\mathbb{R}x^2f(x)dx=E$, find $\inf\int_\mathbb{R}f(x)\log f(x) dx$ 
$f:\mathbb{R}\rightarrow[0,+\infty]$
$\int_\mathbb{R}f(x)dx=M,\int_\mathbb{R}xf(x)dx=0,\int_\mathbb{R}x^2f(x)dx=E$
Please evaluate $\inf\int_\mathbb{R}f(x)\log f(x) dx$

where $M$ and $E$ are given constants.
I think it's related to the convexity of $x\log x$ while there is a hint saying that the $f$ which reaches the minimum is a Gaussian function.
Thanks in advance.A hint will also be appreciated.
 A: Let $\mathcal{A}$ be the set of all functions $f : \mathbb{R} \to [0, \infty]$ satisfying the given conditions. Then $\mathcal{A}$ is convex. Now if we define $H : \mathcal{A} \to \mathbb{R}$ by
$$ H(f) = \int_{\mathbb{R}} f(x) \log f(x) \, \mathrm{d}x $$
and choose $f$ to be
$$ f(x) = \sqrt{\frac{M^3}{2\pi E}} \, e^{-Mx^2/2E}. $$
Indeed we can check that $f \in \mathcal{A}$. Next, for any $g \in \mathcal{A}$, the right-derivative of $H((1-t)f + tg)$ at $t = 0$ satisfies
$$ \left. \frac{d}{dt}\right|_{t=0} H((1-t)f + tg)
= \int_{\mathbb{R}} (g(x) - f(x))(1 + \log f(x)) \, \mathrm{d}x
= 0 $$
since $1 + \log f(x)$ is a quadratic polynomial in $x$ and $f, g \in \mathcal{A}$. Moreover, if in addition $g \neq f$, then
$$ \frac{d^2}{dt^2} H((1-t)f + tg)
= \int_{\mathbb{R}} \frac{(g(x) - f(x))^2}{(1-t)f(x) + tg(x)} \, \mathrm{d}x > 0 $$
for any $t \in (0, 1)$, and so, $t \mapsto H((1-t)f + tg)$ is strictly increasing. Consequently, it follows that $H(f) \leq H(g)$ for all $g \in \mathcal{A}$ and the equality holds if and only if $f = g$. Therefore $f$ is the unique minimizer of $H$, and so,
$$ \inf_{g \in \mathcal{A}} H(g) = H(f) = \frac{M}{2}\left( \log \left( \frac{M^3}{2\pi E}\right) - 1 \right). $$
