# Convex + Monotone =? Convex

Does the sum of a convex function and monotonically increasing function (not necessarily convex) yield a convex function?

$g(x)=2x+\sin x$ is strictly increasing, $f(x)=\frac15x^2$ is strictly convex. Yet, $f''(x)+g''(x)=\frac25-\sin x$, so $f+g$ is not convex.

The function $f(x)=0$ is a convex function. Thus, you would require that every monotone increasing function is convex.

• I understand the trivial example. I was more thinking of a convex function with a single minimum. Does that change anything? – Cowboy Trader Jun 7 '18 at 10:43
• It doesn't, see the example by @SaucyO'Path – Severin Schraven Jun 7 '18 at 10:46
• @CagdasOzgenc you can arbitrarily well approximate the zero function with a single-minimum function. – leftaroundabout Jun 8 '18 at 9:46
• @leftaroundabout That's true. I had a bowl shape function in my mind that appears often in optimization, but the accepted answer covers that case as well. – Cowboy Trader Jun 8 '18 at 11:59

For another example, which visibly fails to be convex and is in fact concave everywhere, add the strictly convex function $f(x) = e^{-x}$ and the strictly increasing function $g(x) = -2 e^{-x}$ to get $f(x) + g(x) = -e^{-x}$.

No. Let $f(x) = x^2$ and $g(x) = \begin{cases}1 & x>0\\ 0 & x\leq 0\end{cases}$.

Then $f$ is convex, $g$ is monotone increasing, but $f+g$ is not continuous on the interior of its domain and so cannot be convex.

Easiest counterexample I could think of was $f(x)=|x|-e^{-x}$: