Show an inequality on convex functions Let $f,g$ be nonnegative continuous functions on $[a,b]$ and $h$ be a convex function on $[0,\infty)$. 
If $\int^b_ag(x)dx=1$, prove:
$\displaystyle h(\int^b_af(x)g(x)dx)\leq\int^b_ah(f(x))g(x)dx$.
 A: The result follows from Jensen Inequality, the discrete case states if $h$ is a convex function in $[0.\infty)$, then for $\sum\limits_{k=1}^n \lambda_k=1$, and $\{y_i\}_{i=1}^n \in [0,\infty)$, we have $h\bigg(\sum\limits_{k=1}^n \lambda_ky_k\bigg) \le \sum\limits_{k=1}^n \lambda_kh(y_k)$.
Choose a partition of $[a,b]$ as $\{x_k | x_k=a+k(\frac{b-a}{n}), 1\le k \le n\}$, and  choose $y_k=f(x_k)$ and $\lambda_k=\dfrac{g(x_k)}{\sum\limits_{k=1}^n g(x_k)}$, for each $k$.
Then the Jensen Inequality gives, $$h\bigg(\sum\limits_{k=1}^n \dfrac{g(x_k)f(x_k)}{\sum\limits_{k=1}^n g(x_k)}\bigg) \le \bigg(\sum\limits_{k=1}^n \dfrac{g(x_k)h(f(x_k))}{\sum\limits_{k=1}^n g(x_k)}\bigg)$$
That is, $h\bigg(\dfrac{\frac{1}{n}\sum\limits_{k=1}^n  g(x_k)f(x_k)}{\frac{1}{n}\sum\limits_{k=1}^n g(x_k)}\bigg) \le  \dfrac{\frac{1}{n}\sum\limits_{k=1}^n g(x_k)h(f(x_k))}{\frac{1}{n}\sum\limits_{k=1}^n g(x_k)}$, and letting $n \to \infty$,
it follows $\displaystyle h(\int^b_af(x)g(x)dx)\leq\int^b_ah(f(x))g(x)dx$
since, $\int^b_ag(x)dx=1$.
A: In probability, this is often known as Jensen's inequality ($g$ is the probability density function of some random variable, and $f$ is some convex function of the variable). 
Note that if $h$ is convex, you can find constants $a,b$ such that $ax+b \leq h(x)$ and for $x_0$, $a x_0 + b = h(x_0)$. This gives you $a f(x) + b \leq h(f(x)) $ Now, multiply both sides by $g$ and integrate. Choose $x_0$ appropriately (see here if you can't figure it out yourself).
