Example of investigating a stationary point

Consider $$ f(x,y) = 4x^3 - 12xy + y^2 + 10y + 6. $$

Computing the first derivatives $$\begin{align*} f_x &= 12x^2 - 12y, \\ f_y &= -12x + 2y + 10. \end{align*}$$ Stationary points satisfy $f_x = f_y = 0$. So $$\begin{align*} 0 &= 12x^2 - 12y \\ y &= x^2 \\ 0 &= -12x + 2x^2 + 10 \\ 0 &= (x - 5)(x - 1) \end{align*}$$ and so the stationary points are $(1,1)$ and $(5,25)$.

Now we compute the second derivatives $$\begin{align*} f_{xx} &= 24x \\ f_{xy} &= -12 \\ f_{yy} &= 2. \end{align*}$$

Contour plot:

Contour near $(1,1)$: the eigenvalue $\lambda_1 > \lambda_2$, so the contour lines are narrower along the eigenvector $\v u_2$ associated with $\lambda_2$.

Contour near $(5,25)$, the eigenvalue $\mu_1 > \mu_2$, so the ellipse is narrower along the eigenvector $\v v_2$ associated with $\mu_2$.