[Math] Second Derivative Test and Hessian for $f(x,y) = x^2 + y^2$.

linear algebramultivariable-calculusreal-analysissolution-verification

My task was to find the critical points of the function $f(x,y) = x^2+y^2$, to then compute the Hessian, and to use the second derivative test to determine whether the critical points are local maxima or minima.

I think I did it correctly, but I'm new to multivariate calculus, so I'd like someone to check my work.


Solution.

$f$ has a critical point when all the partial derivatives are $0$. The partials are $$\frac{\partial}{\partial x} (x^2+y^2) = 2x$$ and $$\frac{\partial}{\partial y} (x^2+y^2) = 2y$$ So $Df(x,y) = [2x \quad 2y]$. Clearly $2x=2y=0$ iff $x=y=0$. Now we need to compute the second-order partial derivatives:
$$\frac{\partial}{\partial x}\left(\frac{\partial}{\partial x}\right) = \frac{\partial}{\partial x} 2x = 2 = D_{xx}f(x,y)$$
$$\frac{\partial}{\partial x}\left(\frac{\partial}{\partial y}\right) = \frac{\partial}{\partial x} 2y = 0 = D_{yx}f(x,y)$$
$$\frac{\partial}{\partial y}\left(\frac{\partial}{\partial x}\right) = \frac{\partial}{\partial y} 2x = 0 = D_{xy}f(x,y)$$
$$\frac{\partial}{\partial y}\left(\frac{\partial}{\partial y}\right) = \frac{\partial}{\partial y} 2y = 2 = D_{yy}f(x,y)$$

The Hessian is then given by:
$$\textbf{H}(x,y) = \left[ \begin{matrix}
D_{xx}f(x,y) & D_{xy}f(x,y) \\ D_{yx}f(x,y) & D_{yy}f(x,y)
\end{matrix}\right]
=
\left[ \begin{matrix}
2 & 0 \\ 0 & 2
\end{matrix}\right]
$$
By the second derivative test, $(0,0)$ is a local minimum if $\textbf{H}(0,0)$ is positive definite, and a local maximum if $\textbf{H}(0,0)$ is negative definite. $\textbf{H}$ is positive definite if $z^T\textbf{H}z$ is positive for every non-zero column vector $z \in \Bbb R^n$. Thus, take $z = [a \quad b]$. We have that $$[a \quad b]\left[ \begin{matrix}
2 & 0 \\ 0 & 2
\end{matrix}\right]\left[\begin{matrix} a \\ b\end{matrix}\right]
=
[a \quad b]
\left[
\begin{matrix}
2a + 0b \\ 0a + 2b
\end{matrix}
\right]
=
[a \quad b]
\left[
\begin{matrix}
2a \\ 2b
\end{matrix}
\right]
=
[2a^2 + 2b^2]
$$
Which is clearly positive definite since $x^2 \geq 0 \forall x\in\Bbb R$. So $(0,0)$ is a local minimum.

Best Answer

Perfect answer, but a small comment with regard to the last matrix computation: \begin{equation} \begin{bmatrix} a & b \end{bmatrix} \begin{bmatrix} 2a \\ 2b \end{bmatrix} = 2a^2+2b^2 \end{equation} Remember that the quadratic form $z^T H z$ is a real number, not a matrix. We call the graph of the function $z=x^2+y^2$ an elliptic paraboloid, btw.