Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do you prove a function like $ax - x\log(x)$ is convex? The definition doesn't seem to work easily due to the non-linearity of the log function.

Any ideas?

share|cite|improve this question

A function $f(x) \in C^2(\Omega)$ is convex if its second derivative is non-negative.

$$f(x) = x \log(x) \implies f'(x) = x \cdot \dfrac1x + \log(x) \implies f''(x) = \dfrac1x > 0$$

EDIT If $f(x) = ax - x\log(x)$, then $f''(x) = - \dfrac1x$ and hence the function is concave.

share|cite|improve this answer

The answer is quite easy if you use derivatives, so here's one which does not use them. Note that for a continuous function $f:P\to\mathbb{R}$, it is sufficient that it satisfies the inequality:

$$f\left(\frac{x}{2}+\frac{y}{2}\right)\geqslant \frac{f(x)}{2}+\frac{f(y)}{2}$$

for all $x,y\in{P}$ to be concave.

By the AM-GM inequality, we have $\frac{x+y}{2}>\sqrt{xy}$ for $x\ne{y}$. Thus, for your function, we have:


EDIT: In fact, since in our case, the inequality is strict, your function is strictly concave.

share|cite|improve this answer

Differentiating twice, we get $$\frac{d^2}{dx^2}x\log(x) = \frac{1}{x}$$ The second derivative is strictly positive everywhere the function is defined, so $x\log(x)$ is strictly convex.

This implies that $ax - x\log(x)$ is strictly concave.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.