An inequality for convex function from $\mathbb R$ to $\mathbb R$ If $f(x): \mathbb R \to \mathbb R$ is a convex function, prove that
$$f(x_1) + f(x_2) + f(x_3) + 3 f(\frac{x_1 + x_2 + x_3}{3}) \geq 2 f(\frac{x_1 + x_2}{2}) + 2 f(\frac{x_1 + x_3}{2}) + 2 f(\frac{x_2 + x_3}{2})$$
What I have tried:
If two of $x_1$, $x_2$, $x_3$ are equal, without loss of generality,  assuming $x_2 = x_3$, then the inequality degenerate to
\begin{align}
f(x_1) + 3 f(\frac{x_1 + 2 x_2}{3}) \geq 4 f(\frac{x_1 + x_2}{2}) 
\end{align}
Since $f$ is convex, we have
$
\frac{1}{4} f(x_1) + \frac{3}{4} f(\frac{x_1 + 2 x_2}{3})
\geq f(\frac{1}{4} x_1 +  \frac{3}{4} \frac{x_1 + 2 x_2}{3})
\geq  f(\frac{x_1 + x_2}{2}) 
$, thus the inequality holds.
Then we consider the case where $x_1$, $x_2$, $x_3$ are distinct. Without loss of generality, we assume $0 = x_1 < x_2 = \lambda \leq \frac{1}{2} < x_3 = 1$. Then the inequality degenerates to
\begin{align}
\frac{1}{2} f(0) + \frac{1}{2} f(\lambda) + \frac{3}{2} f(\frac{\lambda + 1}{3}) + \frac{1}{2} f(1)  \geq f(\frac{\lambda}{2}) + f(\frac{1}{2}) + f(\frac{\lambda + 1}{2})
\end{align}
If $x_2 = \frac{1}{2}$, it further degenerates to
$\frac{1}{2} f(0) + \frac{1}{2} f(0.5) + \frac{1}{2} f(0.5) + \frac{1}{2} f(1)  \geq  f(0.25) + f(0.75),$
which is obviously true. Thus we can only consider $0 < \lambda < \frac{1}{2}$ (then $0 < \frac{\lambda}{2} < \lambda < \frac{\lambda + 1}{3} < \frac{1}{2} < \frac{\lambda + 1}{2} < 1$).

A proof of Popoviciu's inequality follows from Jensen's Inequality for convex functions. Wlog, assume $x \le y \le z$ there are two possibilities. Either $\displaystyle y < \frac{x+y+z}{3}$ or the reverse. 
In the first case, $\displaystyle \frac{x+y+z}{3} < \frac{x+z}{2}< z$ and $\displaystyle \frac{x+y+z}{3} < \frac{y+z}{2} < z$, thus, there are positive real numbers $\lambda_1,\lambda_2 >0$ such that,
$\displaystyle \frac{x+z}{2} = \lambda_1 z + (1-\lambda_1)\left(\frac{x+y+z}{3}\right)$ and $\displaystyle \frac{y+z}{2} = \lambda_2 z + (1-\lambda_2)\left(\frac{x+y+z}{3}\right)$
It is easy to verify that $\lambda_1 + \lambda_2 = \dfrac{1}{2}$.
Now, using Jensen's inequality one has:
$\displaystyle f\left(\frac{x+y}{2}\right) \le \frac{f(x)+f(y)}{2}$
$\displaystyle f\left(\frac{x+z}{2}\right) = \lambda_1 f(z) + (1-\lambda_1)f\left(\frac{x+y+z}{3}\right)$
$\displaystyle f\left(\frac{y+z}{2}\right) = \lambda_2 f(z) + (1-\lambda_2)f\left(\frac{x+y+z}{3}\right)$
Adding the three inequalities gives the Popoviciu's inequality. The second case where $\displaystyle y > \frac{x+y+z}{3}$ we simply interchange the roles of $x$ and $z$ and the rest is similar.
