# Proving inequality using convexity

I have to prove the following inequality: $$4xy\sqrt{e^x}\sqrt{e^y}\leq (x+y)(ye^x+xe^y).$$

It's not explicitly stated that I have to use convexity as a proof however it is suggested, and I really don't understand how I'm supposed to do it I understand the definition of convexity but I'm not sure how to apply it here.

The inequality does not necessarily hold if $$x$$ and $$y$$ are of opposite sign (consider $$y=-1$$ and large $$x > 0$$).
For $$x, y> 0$$ you can rewrite the inequality as $$\frac{e^{\frac{x+y}2}}{\frac{x+y}2} \le \frac 12 \left( \frac{e^x}{x} + \frac{e^y}{y}\right) \,,$$ that hopefully helps to solve the problem using convexity.
For $$x,y < 0$$ you can proceed similarly.
Consider the function $$f(x)=\frac{e^x}{x},\ x>0,$$ then $$f''(x)=\frac{(x-1)^2+1}{x^3}e^x>0, \forall x>0.$$ So $$f\left(\frac{x+y}{2}\right)\leq \frac{1}{2}(f(x)+f(y))$$ which is the desired inequality!
Assume $$xy\ge 0$$ since the given inequality is not necessarily true if $$x$$ and $$y$$ have different signs. Since $$2ab \le a^2+b^2$$ for all $$a,b\ge 0$$, we find that $$2\sqrt{|x|}\sqrt{|y|}\le |x|+|y|,$$ $$2\sqrt{|y|e^x}\sqrt{|x|e^y}\le |y|e^x+|x|e^y.$$ Combining them, we obtain $$4|xy|\sqrt{e^x}\sqrt{e^y}\le (|x|+|y|)(|y|e^x+|x|e^y),$$ or equivalently $$4xy\sqrt{e^x}\sqrt{e^y}\le (x+y)(ye^x+xe^y)$$ for all $$xy\ge 0$$.