TITLE: Proving that multiplication of convex function is convex
QUESTION [13 upvotes]: Here's a homework question I'm struggling with:

Prove/disprove the next statement:
Let $f,g$ two convex functions, then $h(x)=f(x) \cdot g(x)$ is
also convex

So, we know that $h'(x)=f'(x) \cdot g(x) + f(x) \cdot g'(x)$. We also know that $f'(x),g'(x)$ are monotonically increasing because they are convex. If I can show that $h'(x)$ is also monotonically increasin I'm done, but I'm not sure how to do it. Any hints?
Thanks!

REPLY [3 votes]: False
Proof:
Let $h(x) = f(x)\cdot g(x)$, or in short: $h = fg$, then:
$h' = gf' + fg'$
and: $h'' = gf'' + 2f'g'+ fg''$
A necessary and sufficient condition for convexity is :
$~h''= gf'' +  2f'g'+ fg'' \ge 0$   $\quad (1)$
A quick test is to check if $f$ and $g$ are both "$\ge 0$", and $f'$ and $g'$ have the same sign ("$\,\ge 0\,$": convex increasing; "$\,\le0\,$": convex decreasing). Otherwise, check condition $(1)$.
Note that if $f = g$, then $h= f^2$ and condition $(1)$ becomes:
$$h'' = 2ff'' + 2(f')^2$$ 
Since $f$ and $g$ are convex, $f''\ge  0$ and $g'' \ge 0$, 
then the only condition to check is $f \ge 0$.