Prove that $E(e^{X}) < \frac{1}{2}(e^{-K} + e^{K})$ if $E(X)=0$ and $|X|I saw this question on a friend's problem set (I mean it, not MY homework) and kept thinking about it, although without success.

Let $X$ be a a random variable such that $ -K < X < K$ for some $ K
>0$. Also, let $E(X) = 0$. Now, prove that $E(e^{X}) < \frac{1}{2}(e^{-K} + e^{K})$.

I'm trying to use Jensen's inequality and so on but I made no progress. Also I tried fooling around with some smart squares but couldn't solve it this way either. Any ideas?
 A: If $X$ only takes values in $[-K,K]$ then it is true, for all convex $\phi$, that $\phi(X) \leqslant \frac{(\phi(K)-\phi(-K))}{2K}X+\frac{\phi(-K)+\phi(K)}{2}$. This is  because the right hand is the equation of the line from $(-K,\phi(-K))$ to $(K,\phi(K))$
Setting $\phi=\exp$ and taking expectations in the above inequality gives $\mathbb{E}(e^X)\leqslant \frac{1}{2}(e^{K}+e^{-K})$
To get the strict inequality, notice that if $\phi$ is strictly convex and $X$ takes values in $(-K,K)$ all inequalities above become strict. (Strict inequalities stay strict by taking expectations because positive variables have positive expectations)
Jensen's inequality's proof looks a lot like the argument above, but gives a minorant of $\phi(X)$ by a line, instead of a majorant like it is the case here.
A: Here is a messy way to solve it. First we prove it when $X$ is given by choosing an element of the list $(x_1,\dots,x_n)$ uniformly at random. The list may have repeats. The general result then follows since any random variable can be approximated by a discrete one. 
The discrete problem is equivalent to the following maximization problem:
 Maximize: $E[e^X]=\frac1n\sum\limits_{i=1}^n e^{x_i}$
 Subject to: $\sum\limits_{i=1}^n x_i=0$, and for all $i$, $-K\le x_i\le K$.
Notice I replaced the condition $-K<X<K$ with $-K\le X\le K$ so that the region is compact, ensuring the maximum is attained.
I claim that $(x_1,\dots,x_n)$ does not obtain the maximum as long as there exist two numbers $x_i$ and $x_j$ which are in the interior $(-K,K)$. This is because given two such numbers, increasing the larger of these by $\epsilon$ and decreasing the smaller by $\epsilon$ will preserve $\sum\limits_{i=1}^n x_i$, but will increase $\frac1n\sum\limits_{i=1}^n e^{x_i}$ (prove this!). 
Therefore, if $(x_1,\dots,x_n)$ attains the maximum, then all but at most one of the variables are equal to $\pm K$. It is easy to see that the only way to satisfy this is to have an equal number of variables equal to $+K$ and $-K$, with the leftover variable (if any) equaling zero. This results in a maximum value of at most $\frac1n(\lfloor n/2\rfloor e^{-K}+\lfloor n/2\rfloor e^K)\le \frac12(e^K+e^{-K})$.
