convexity proof of a function including ln and sums
Solution 1:
Taking the Hessian gives $$ \frac{\partial^2}{\partial x_j\partial x_k}f(x) =\overbrace{\begin{bmatrix} \frac1{x_1}&0&0&\cdots&0\\ 0&\frac1{x_2}&0&\cdots&0\\ 0&0&\frac1{x_3}&\cdots&0\\ \vdots&\vdots&\vdots&\ddots&\vdots\\ 0&0&0&\cdots&\frac1{x_n} \end{bmatrix}}^{\small\displaystyle\frac{\partial^2}{\partial x_j\partial x_k}\sum_{i=1}^nx_i\log(x_i)} -\overbrace{\frac1{\sum\limits_{i=1}^nx_i} \begin{bmatrix} 1&1&1&\cdots&1\\ 1&1&1&\cdots&1\\ 1&1&1&\cdots&1\\ \vdots&\vdots&\vdots&\ddots&\vdots\\ 1&1&1&\cdots&1 \end{bmatrix}\vphantom{\begin{bmatrix}\frac1{x_1}\\\frac1{x_1}\\\frac1{x_1}\\\vdots\\\frac1{x_1}\end{bmatrix}}}^{\small\displaystyle\frac{\partial^2}{\partial x_j\partial x_k}\left(\sum_{i=1}^nx_i\right)\log\left(\sum_{i=1}^nx_i\right)} $$ Thus, by Hölder's Inequality, $$ \begin{align} u^T\frac{\partial^2}{\partial x_j\partial x_k}f(x)u &=\sum_{i=1}^n\frac{u_i^2}{x_i} -\frac{\left(\sum\limits_{i=1}^nu_i\right)^2}{\sum\limits_{i=1}^nx_i}\\ &=\frac1{\sum\limits_{i=1}^nx_i}\left(\sum_{i=1}^nx_i\sum_{i=1}^n\frac{u_i^2}{x_i}-\left(\sum\limits_{i=1}^nu_i\right)^2\right)\\ &\ge0 \end{align} $$ The Hessian Matrix is positive semi-definite, so $f$ is convex.