Determine if $f(x,y,z) = x^2+y^2+z^2 + \min(x+2y+z, (x+2y+z)^2)$ is convex. 
Consider the following function:
  $$f(x,y,z) = x^2+y^2+z^2 + \min(x+2y+z, (x+2y+z)^2)$$
  Determine if this function is convex or not. 

So I know for a convex function, any two points $x_1$, and $x_2$
$f(cx_1+(1-c)x_2)\leq cf(x_1) + (1-c)f(x_2)$
where $0 \leq c \leq1$ 
is true
I get the feeling the question wants me to find a counter example to this principle, but I have been staring at it for hours and cannot find 2 points, and I'm not really sure how to prove its %100 true.

This function is NOT convex:
There exist cases where 
$$\frac{1}{2}(f(a, b, c) + f(a', b', c')) < f\left(\frac{a+a'}{2},\frac{b+b'}{2},\frac{c+c'}{2}\right)$$
It suffices to take $a=0.6, b=0.55, c=-1, a'=0.7,b'=0.75, c'=-1$ and we have
$$\frac{1}{2}(f(0.6, 0.55, -1) + f(0.7, 0.75, -1)) - f(0.65, 0.65, -1)=-0.045$$
Edit 1: How did I find these values ? By blocking the value of $z$ (here it is "blocked" at $z_0=-1$) and representing the surface $z=f(x,y,z_0)$. My attention was attracted by the little gutter I saw on the first picture below, and I selected two points on both sides of the limits of this gutter.
Edit 2 : There is a much simpler method to display evidence of non-convexity. It suffices to consider:
$$f(x,0,0)=min(x^2+x,x^2)$$
See Figure 2. No supplementary comment is necessary...

(Figure 1)

(Figure 2)
