# Is it always true that $f=g+h$ is not convex when $g$ is convex and $h$ is neither convex or concave?

Suppose we have the function $$f=\frac{x^2}{2} + 10y^2 - 10xy$$ where $$g=\frac{x^2}{2} + 10y^2$$ and $$h= - 10xy$$.

In this case $f$ is a sum of a convex function $g$ and a function $h$ which is neither convex or concave. And it turns out that this particular function $f$ is not convex.

Is a function $f$ always not convex when it is written as a sum of a convex function and a function which is neither convex or concave?

No. $$f(x)=x^4, g(x)= x^2, h(x)= x^4-x^2.$$ Here $f, g$ are convex, $h$ is neither convex nor concave [since $h''=0 \iff 6x^2 = 1$].