How to prove $f(x)=\log\left(\displaystyle\sum_{i=1}^n e^{x_i}\right)$ is a convex function?
EDIT1: for above function $f(x)$, following inequalities hold:
$$\max\{x_1,x_2,\ldots,x_n\}\leqslant f(x)\leqslant\max\{x_1,x_2,\ldots,x_n\}+\log n$$
and I have tried proving its convexity via definition of a convex function with above inequalities, but that didn't work.
EDIT2: I have posted my answers below.