How do I prove the convexity of this function under constraint?

120 Views Asked by At

Here is a function $f:\{x\in \mathbb{R}^{n}_{+}: \sum_{i=1}^n{x_i} =1\} \rightarrow \mathbb{R}$ defined as,

$ f(x) = \left\{ \begin{array}{rl} -\sum_{i=1}^n x_i \log(x_i) & \text{ if } \; x > 0 \\ 0 & \text{ if } x \leq 0 \end{array} \right. $

I know that by seeing $-\sum_{i=1}^n x_i \log(x_i)$ itself it is a simple question that could be easily tearing it into n small functions and each of them could be proved to be convex by calculating the second derivatives. However, with the constraint that $\{x\in \mathbb{R}^{n}_{+}: \sum_{i=1}^n{x_i} =1\}$, I am not so sure that I can still prove its convexity/concavity through this way. Any idea? Also, when $x \leq 0$, does that affect the convexity/concavity of the function?