\newsectionNoPB
\subsection{Critical points}
\stepLabelNumber{all}
\compactdef{Critical Point} For $f: X \rightarrow \R^n$ differentiable, $x_0 \in X$ is called a \bi{critical point} of $f$ if $\nabla f(x_0) = 0$\\
\shortremark As in 1 dimensional case, check edges of the interval for the critical point.\\
%
To determine the kind of critical point, we need to determine if $H_f(x_0)$ is definite:
\drmvspace
\begin{multicols}{3}
    \begin{itemize}[noitemsep]
        \item positive definite $\Rightarrow x_0$ local max
        \item negative definite $\Rightarrow x_0$ local min
        \item indefinite $\Rightarrow x_0$ point of inflection
    \end{itemize}
\end{multicols}

\dhrmvspace
\setLabelNumber{all}{6}
\compactdef{Non-degenerate critical point} If $\det(H_f(x_0)) \neq 0$ (if $H_f(x_0)$ is semi-definite, then $\det(H_f(x_0)) = 0$, thus degenerate)

To figure out if a matrix is definite, we can compute the eigenvalues. $A$ is positive (negative) definite, if and only if all eigenvalues are greater (lower) than $0$.
$A$ is indefinite if and only if it has both positive and negative eigenvalues.
$A$ is positive (negative) semi-definite if and only if all eigenvalues are greater (lower) or equal to $0$.
It is positive (negative) definite if and only if all eigenvalues are greater (lower) than $0$
(Compute Eigenvalues using $\det(A - \lambda I) = 0$)

For $2 \times 2$ matrices (i.e. 2D functions), we can use the following scheme (remember that the trace is the sum of the diagonal entries):
\begin{center}
    \begin{tikzpicture}[node distance = 0.3cm and 2cm, >={Stealth[round]}]
        \node (det) {$\det(A)$};
        \node (indef) [below=of det] {indefinite};
        \node (tr0) [right=of det] {$\text{Tr}(A)$};
        \node (posdef) [above right=of tr0, yshift=-0.5cm] {pos. def.};
        \node (negdef) [below right=of tr0, yshift=+0.5cm] {neg. def.};
        \node (tr1) [left=of det] {$\text{Tr}(A)$};
        \node (possemdef) [above left=of tr1, yshift=-0.5cm] {pos. semi-def.};
        \node (negsemdef) [below left=of tr1, yshift=+0.5cm] {neg. semi-def.};
        \node (zero) [below=of tr1] {$A$ is zero};

        \path[->]
        % Level 0
        (det) edge node [above] {positive} (tr0)
        (det) edge node [above] {$0$} (tr1)
        (det) edge node [right] {negative} (indef)
        (tr0) edge node [above] {positive} (posdef)
        (tr0) edge node [below] {negative} (negdef)
        (tr1) edge node [above] {positive} (possemdef)
        (tr1) edge node [below] {negative} (negsemdef)
        (tr1) edge node [right] {$0$} (zero);
    \end{tikzpicture}
\end{center}
As in Analysis I, it is important to also check the boundaries for maximums and minimums (as it may also be possible that there are NO critical points in the set).
For that, formulate formulas for the borders and check them for critical points.

This is mostly intuition, but think of what segments the set consists of and note them down.
Then, for each of the sets of the segments, determine the critical points
(e.g. for set $A = \{ (x, y) \in \R^2 \divides x = 0, 0 \leq y \leq 3 \}$, we compute the critical points of $f(0, y)$).

This can be done as follows if only one variable remains: $\frac{\dx}{\dx y} f(0, y)$ using Analysis I conditions ($\frac{\dx}{\dx x}$ for $x$ variable of course),
i.e. if derivative cannot be $0$, there is no critical point there, else find solution for $x$ or $y$.

For cases where $x$ and $y$ are both not $0$, we have to parametrize the set
(e.g. for set $C = \{ (x, y) \in \R^2 \divides 3x + y = 3, 0 \leq x \leq 1 \}$, we have $\gamma(t) = (t, 3 - 3t)$ and compute the critical points of $f(\gamma(t))$)

Finally, evaluate if the points are minima or maxima. It is often easiest to compute $f(x, y)$ at these points to see,
where the lowest value is the global minimum and the highest value the global maximum (obviously).
Always consider the corners as possible maxima or minima (if some corners are critical points, all are highly likely to be).

The tangent plane at a critical point of a function $f : \R^n \rightarrow \R$, is of the form $\{ (x, y, z) \divides z = \text{const} \}$, with $z = f(x_0)$.

Note that a global minimum or maximum is the maximal / minimal element of the range of the function.
