I am trying to determine if the function
$$f: \mathbb R^3 \to \mathbb R, \qquad (x,y,z) \mapsto \left(x^2 + \exp \left(y^2\right)\right)z$$
is convex. I tried to compute the Hessian matrix:
$$\begin{pmatrix} 2z & 0 & 2x \\0 & 4\exp(y^2)y^2z+2\exp(y^2)z & 2\exp(y^2)y \\2x & 2\exp(y^2)y & 0 \\\end{pmatrix}$$
but was not able to obtain any useful in information. Is there another way I could prove that is function is convex or not? Thank you for any tips!
We easily see that $x^2+e^{y^2}$ is convex and consequently $-x^2-e^{y^2}$ becomes concave. Hence $f(x,y,1)$ is convex and $f(x,y,-1)$ is concave. Therefore this function is neither convex nor concave.