# Determine all local and global extrema of the function

Determine all local and global extrema of the function $$\begin{equation*}f:\mathbb{R}^2\rightarrow \mathbb{R} , \ \ f(x,y)=x^3+3xy^2-3x+1\end{equation*}$$ Determine also the type of extrema : minimum, maximum, local, global.



I have done the following :

First we calculate the gradient : $$\begin{equation*}\nabla f=\begin{pmatrix}f_x \\ f_y\end{pmatrix}=\begin{pmatrix}3x^2+3y^2-3 \\ 6xy\end{pmatrix}\end{equation*}$$ Then we set the gradient equal to $$0$$ and we solve the syste that we get: $$\begin{equation*}\begin{pmatrix}3x^2+3y^2-3 \\ 6xy\end{pmatrix}=\begin{pmatrix}0\\ 0\end{pmatrix}\Rightarrow \begin{cases}3x^2+3y^2-3=0 \\ 6xy=0\end{cases}\end{equation*}$$ From the second equation we get $$x=0$$ or $$y=0$$. If $$x=0$$ we get from the first equation $$3y^2-3=0\Rightarrow y^2=1 \Rightarrow y\pm 1$$. If $$y=0$$ we get from the first equation $$3x^2-3=0\Rightarrow x^2=1 \Rightarrow x\pm 1$$. So we get the extrema $$(0,-1)$$, $$(0,1)$$, $$(-1,0)$$, $$(1,0)$$.

Now we determine the Hessian matrix : $$\begin{equation*}H_f(x,y)=\begin{pmatrix}f_{xx} & f_{xy} \\ f_{yx} & f_{yy}\end{pmatrix}=\begin{pmatrix}6x & 6y \\ 6y & 6x\end{pmatrix}\end{equation*}$$

• $$\begin{equation*}H_f(0,-1)=\begin{pmatrix}0 & -6 \\ -6 & 0\end{pmatrix}\end{equation*}$$ The eigenvalues are $$\lambda_1=-6$$ and $$\lambda_2=6$$. The matrix is indefinite. So at $$(0,1)$$ the function has a saddle point.
• $$\begin{equation*}H_f(0,1)=\begin{pmatrix}0 & 6 \\ 6 & 0\end{pmatrix}\end{equation*}$$ The eigenvalues are $$\lambda_1=-6$$ and $$\lambda_2=6$$. The matrix is indefinite. So at $$(0,1)$$ the function has a saddle point.
• $$\begin{equation*}H_f(-1,0)=\begin{pmatrix}-6 & 0 \\ 0 & -6\end{pmatrix}\end{equation*}$$ The eigenvalues are $$\lambda_1=-6$$ and $$\lambda_2=-6$$. The matrix is negative definite. So at $$(-1,0)$$ the function has a local maximum.
• $$\begin{equation*}H_f(1,0)=\begin{pmatrix}6 & 0 \\ 0 & 6\end{pmatrix}\end{equation*}$$ The eigenvalues are $$\lambda_1=6$$ and $$\lambda_2=6$$. The matrix is positive definite. So at $$(1,0)$$ the function has a local minimum.

Do we have to check also some other points or can we say that at $$(-1,0)$$ the function has also a global maximum and at $$(1,0)$$ a global minimum?

• You can rewrite the function as, $f(x,y) = x (x^2 + 3y^2 - 3) + 1$ and that shows that as $x \to +\infty$, $f(x, y) \to +\infty$ and similarly when $x \to - \infty$, $f(x, y) \to -\infty$ Sep 3, 2021 at 14:34
• I see! Thank you very much!! :-) @MathLover Sep 3, 2021 at 15:19

That function neither has a global maximum nor a global minimum. Note that $$f(x,0)=x^3-3x+1$$ and that $$\lim_{x\to\pm\infty}x^3-3x+1=\pm\infty$$.
• Ahh ok! So only the local minimum at $(1,0)$ and the local maximum at $(-1,0)$, right? Sep 3, 2021 at 14:26