Problem. Prove that $$E[\log f(X)] \ge E [\log q(X)], $$ if $X$ is a random variable with PDF $f(x)$ and $q(x)$ is any valid PDF.
Hint provided: Use Jensen's Inequality.
This means:
\begin{gather*} E [\log f(X)] = \int f(x) \log f(x) \, \mathrm{d}x \ge E[\log q(X)] = \int f(x) \log q(x) \, \mathrm{d}x \\[0.75em] \implies -\int f(x) \log \biggl(\frac{q(x)}{f(x)}\biggr) \, \mathrm{d}x \ge 0. \end{gather*}
Now, I am unable to understand how to move forward to use Jensen's inequality and thus get according expression.
$$ E\biggl[ \frac{g(X)}{f(X)} \biggr] = \int \frac{g(x)}{f(x)} f(x) \, \mathrm{d}x = \int g(x) \, \mathrm{d}x = 1 .$$
By Jensen's inequality applied to the convex function $-\log x$ we get
$$ 0 = -\log E\biggl[ \frac{g(X)}{f(X)} \biggr] \le - E \biggl[ \log \frac{g(X)}{f(X)} \biggr] = - E [\log g(X)] + E [\log f(X)]. $$
Hence, $E[\log g(X)] \leq E[\log f(X)]$.