Question: If $x\in\mathbb{R^n}$, then $f(x)=\log(e^{x_1}+\cdots+e^{x_n})$ is convex or not?
For $x\in\mathbb{R}$, $f(x)=\log(e^x)$ is convex since it is a line. Or using the definition of linearity, $$\alpha f(x)+\beta f(y)=\log(e^{\alpha x})+\log(e^{\beta y})=\log(e^{\alpha x+\beta y})=f(\alpha x+\beta y)~,$$ thus $f(x)$ is convex.
I have plotted $f(x)$ for $x\in\mathbb{R^2}$, it doesn't look like convex. But how we can show it?
We also can rewrite $f(x)=h(g(x))$, where $h(x)$ is concave and $g(x)$ is convex, but is it helpful? I couldn't find any convex preserving operation based on that.
Since $\frac{\partial^2 f}{\partial x_k^2}=\frac{\sum_{i\neq k}e^{x_i+x_k}}{(\sum_{i=1}^n e^{x_i})^2}$ and $\frac{\partial^2 f}{\partial x_s x_t}=-\frac{e^{x_s+x_t}}{(\sum_{i=1}^n e^{x_i})^2}$
So the sum of all elements in each row is 0 only the diagonal elements of Hessian matrix is positive. It is diagonally dominant matrix so that the Hessian matrix is positive semidefinite and f(x) is convex