I am currently trying to complete my optimisation methods assignment.
I have a function $$f(x,y) = \left(y - x^2\right)^2 + (1-x)^2$$ and I need to check it for convexity.
I have found the Hessian matrix
$$ H = \begin{pmatrix} 12x^2 - 4y + 2 & -4x \\ -4x & 2 \end{pmatrix}$$
As far as I know, the function is convex if and only if its Hessian matrix is positive define. According to Sylvester's criterion, a matrix is positive define if its leading principal minors are positive. However, when I write down the Hessian matrix's minors, I get the following
$$ \begin{align} M_1 &= 12 x ^2 - 4y + 2 \\ M_2 &= 8x^2 - 4y + 2 \end{align}$$
From what I have written, I can't conclude about the minor sign and can't check for convexity. I am stuck on this and would really appreciate if somebody would recommend what to do.