$f(x_1 , x_2) = x_1^2 + 1 + (x_2 - x_1^2)^2$ , $(x_1 , x_2) \in \mathbb R^2$
I have to prove that $f(x_1 , x_2)$ is convex on the region $\{(x_1 , x_2) : 0 \leq x_2 \leq x_1\}$.
My Attempt : The Hessian Matrix of $f$ will be $H=\begin{pmatrix} 2-4x_2+12x_1^2 & -4x_1 \\ \\-4x_1 & 2\end{pmatrix}$.
The product of the eigen values of the matrix $H$ is $4-8x_2 + 8x_1^2 \geq 4-8x_1 + 8x_1^2 $. [Since $0 \leq x_2 \leq x_1$]
Now the discriminant of $f(x_1) = 4-8x_1 + 8x_1^2 $ is less than zero and $f(1) > 0$. So $ 4-8x_2 + 8x_1^2 > 0$ for all $(x_1 , x_2) $ in the region. Therefore, the product of the eigen values of $H$ is also positive for all $(x_1 , x_2) $ in the region.
Similarly we can show that the sum of the eigen values of $H$ , $4 - 4x_2 + 12 x_1^2 $ , is greater than zero for all $(x_1 , x_2) $ in the region.
So we can say $H$ is a positive definite matrix when $(x_1 , x_2) \in \{(x_1 , x_2) : 0 \leq x_2 \leq x_1\}$ . Therefore , $f$ is convex in $\{(x_1 , x_2) : 0 \leq x_2 \leq x_1\}$ .
Can anyone please check my attempt ? Have I gone wrong anywhere?
nitkicking:
$$4-8x_2+8x_1^2 \color{red}\ge 4-8x_1+8x_1^2 $$
Also, for the second part, you mean the sum of eigenvalues is positive since
$$4-4x_2+12x_1^2 \ge 4-4x_1+12x_1^2 $$
and the discriminant of the right hand side is $16-4(4)(12)<0$ and the right hand side is convex, hence the sum of the eigenvalues are positive.
That is the Hessian is positive definite and you can conclude that it is positive definite.