Application of Jensen's Inequality to non-negative integrable function I am reading  a book, where it uses the following result. Can someone help me to derive the result? I know i have to use Jensen's inequality here, but not sure how to get the final result.
Here is the claim.
If $f$ and $g$  be non-negative and integrable functions with respect to a
measure $\mu$  and $S$ be the region in which $f > 0$ . If$\int_{s} ( f - g ) d\mu \ge 0$, then $\int_{s}f\log\frac{f}{g}d\mu \ge 0$.
Thank you in advance for any help.
 A: We assume $d\mu$ positive (for Jensen to make sense) and first assume $0<A=\int_{S}fd\mu < \infty$, let $h=\frac{f}{A}, hd\mu=d\nu$ is a unit (positive) measure on $S$. 
Then with $u=\frac{g}{f} \ge 0$, Jensen inequality says that 
$\int_{S}(h\log{u}) d\mu=\int_{S}(\log{u}) d\nu \le \log{\int_{S}ud\nu}=\log{\int_{S}hud\mu}=\log{\int_{S}\frac{g}{A}d\mu}=\log\frac{\int_{S}gd\mu}{\int_{S}fd\mu} \le \log 1 =0$ which immediately gives the required result since 
$\int_{S}(h\log{u}) d\mu=-\frac{1}{A}\int_{S}(f\log{\frac{f}{g}}) d\mu$
In general, decompose $S$ into countable disjoint $\mu$-measurable sets for which the integral of $f$ is finite, apply the above and the countable additivity of the integral (which works since each integral of $f\log \frac{f}{g}$ is positive by the above; technically we would also need to separate the case when $g=0$ on a set of non-zero measure for $\mu$ but that is trivial since then the integral of $f\log \frac{f}{g}$ is positive infinity there and again the above applies...
