Computation of an integral in a consequence of the Jensen's inequality. Proposition. Let $y_1,\dots, y_n\ge 0$, $\alpha_1,\dots, \alpha_n>0$ such that $\sum_{i=1}^n\alpha_i=1$, then $$\prod_{i=1}^ny_i^{\alpha_i}\le \sum_{i=1}^n\alpha_iy_i$$
proof. We consider $\varphi(x)=e^x$, then the Jensen's inequality becomes: $$\exp\bigg(\int_X f\;d\mu\bigg)\le \int_X (\exp f)\:d\mu.$$
Let now $$X=\{t_1,\dots, t_n\},\quad \mathcal{A}=\mathcal{P}(X),\quad \mu(\{t_i\})=\alpha_i\ge 0,$$ when $\sum_{i=1}^n\alpha_i=\mu(X)=1.$ The function $f\colon X\to \overline{\mathbb{R}}$ is define by $$f=\sum_{i=1}^n f(t_i)\chi_{\{{t_i}\}},$$ then $$\int_Xf\;d\mu=\sum_{i=1}^nf(t_i)\mu(\{t_i\}),$$ I have problem to compute the following integral $$\int_X (\exp f)\;d\mu.$$
I know that the result is $$\sum_{i=1}^n\mu(\{t_i\})e^{f(t_i)}$$
Could you give me some hints? Thanks!
 A: That is not quite the way to do it. First possibility is that you could just $-\log$ the equation to get
$$
\sum_{i = 1}^n \alpha_i(-\log(y_i)) \geq -\log\left(\sum_{i = 1}^n \alpha_i y_i \right).
$$
But this is true since $g := -\log$ is convex.

But if you really want to use the integral version to prove the above in detail, then set $f: \mathbb{N} \rightarrow \mathbb{R}$
$$
f(i) :=  y_i, \quad X = \lbrace 1, ..., n \rbrace, \quad \mathcal{A} = 2^X, \quad \mu(\lbrace i \rbrace) = \alpha_i .
$$
Then you get
$$
\int_X -\log(f)~\mathrm{d}\mu = \sum_{i = 1}^n \alpha_i (-\log(y_i))
$$
Also:
$$
-\log\left( \int_X f~\mathrm{d}\mu\right) = -\log\left( \sum_{i = 1}^n \alpha_i y_i \right)
$$
We know that
$$
-\log\left( \int_X f~\mathrm{d}\mu\right) \leq \int_X -\log(f)~\mathrm{d}\mu.
$$
A: It's exactly what you wrote since
$e^f = 
\sum_{i = 1}^{n}e^{f(t_i)}1_{\{t_i\}}.$
Edit: You have a function $f : \{t_1, \dots, t_n\} \to \mathbb{R}$. In general, as you wrote, $f$ has the representation $f = \sum_{i = 1}^{n}f(t_i)1_{\{t_i\}}$. Now apply this result to $e^f : \{t_1, \dots, t_n\} \to \mathbb{R}$ to get $e^f = \sum_{i = 1}^{n}(e^f)(t_i)1_{\{t_i\}}$.
