Prove convexity of $f(x)=\sum_{i=1}^{n}{x_i\ln{x_i}}-\left(\sum_{i=1}^{n}{x_i}\right)\ln\left(\sum_{i=1}^{n}{x_i}\right)$ over $\mathbb{R}_{++}^n$

76 Views Asked by At

Prove convexity of $$f(x)=\sum_{i=1}^{n}{x_i\ln{x_i}}-\left(\sum_{i=1}^{n}{x_i}\right)\ln\left(\sum_{i=1}^{n}{x_i}\right)$$ over $\mathbb{R}_{++}^n$.

I found the gradient and the Hessian of $f(x)$, but didn't manage to prove $\nabla^2f(x)\succeq0$. Any other method (using convexity rules etc.) accepted as well.

$$\frac{\partial{f}}{\partial x_i}=\ln(x_i)-\ln\left(\sum{x_i}\right)$$ $$\frac{\partial^2{f}}{\partial x_i x_j}= \begin{cases} \frac{1}{x_i} - \frac{1}{\sum{x_i}} &\quad \text{if }i=j\\ \frac{1}{\sum{x_i}} &\quad \text{if }i\neq j\\ \end{cases}$$

Please advise.

Thank you.

Edit: While trying to prove that $A=\nabla^2f(x)\succeq0$, the expension of $y^TAy$ that I got is: $$y^TAy=\sum_{i=1}^{n}{\frac{y_i^2}{x_i}}-\frac{1}{\sum_{i=1}^{n}{x_i}} \sum_{i \neq j}{y_i y_j}$$ One possible way of proving convexity is showing $y^TAy\geq0$ for any $y \in \mathbb{R^n_{++}}$.