Let $\mathcal P$ be the set of probability densities on $[0,1]$ with mean $1/2$, i.e. $p\in \mathcal P$ iff


$$\int\_0^1 p(x)dx=1,\quad \int\_0^1 xp(x)dx=\frac{1}{2}\quad \mbox{and}\quad p(x)\ge 0, ~~\forall x\in [0,1].$$


How to solve the minimization problem below ?


$$\min\_{p\in\mathcal P}~ \left\{V(p) ~:=~ \int\_0^1 \log\big(p(x)\big)p(x)dx + \int\_0^1 \big(x\log(x)+(1-x)\log(1-x)\big)p(x)dx\right\}.$$



Minimization of an entropy type functional
As in the comment by leo monsaingeon, let
$$p\_\*(x):=e^{h(x)}/c,$$
where $h(x):=-x\ln x-(1-x)\ln(1-x)$ and $c:=\int\_0^1 e^{h(x)}\,dx$, so that $p$ is a pdf on $(0,1)$ with mean $1/2$, and
$$V(p)=\int\_0^1(p(x)\ln p(x)-h(x)p(x))\,dx.$$


For any pdf $q$ on $(0,1)$ with $V(q)<\infty$, the directional derivative of $V$ at $p\_\*$ in the direction of $q-p\_\*$ is
$$\begin{aligned}
&\frac d{dt}\,V(p\_\*+t(q-p\_\*))\Big|\_{t=0} \\ 
&=\int\_0^1 (1+\ln p\_\*(x)-h(x))(q(x)-p\_\*(x))\,dx \\ 
&=\int\_0^1 (1+h(x)-\ln c-h(x))(q(x)-p\_\*(x))\,dx=0,
\end{aligned}$$
since $q$ and $p\_\*$ are pdf's on $(0,1)$.


The crucial point is that the function $V$ is convex (since $u\ln u$ is convex in $u\ge0$, with $0\ln0:=0$). So, $p\_\*$ is indeed a minimizer of $V$.


