Example 1. Find the maximum and minimum values of the function $z=f(x, y)=2 x^{2}-2 y^{2}$ in the circle $x^{2}+y^{2} \leq 9$.
Solution. The given function has partial derivatives:

$$
f_{x}^{\prime}(x, y)=4 x ; f_{y}^{\prime}(x, y)=-4 y
$$

Setting these derivatives to zero, we get a system of equations from which we find $x_{0}=0, y_{0}=0$. The value of the function at the critical point $M_{0}(0,0)$ is zero:

$$
z_{0}=f(0,0)=2 \cdot 0-2 \cdot 0=0
$$

The boundary of the given closed domain is the circle

$$
x^{2}+y^{2}=9 \text { or } y^{2}=9-x^{2} \text {, }
$$

where $-3 \leq x \leq 3$. The function $z=2 x^{2}-2 y^{2}$ on the boundary of the domain becomes a function of one variable $x$:

$$
z(x)=2 x^{2}-2\left(9-x^{2}\right)=4 x^{2}-18
$$

the argument of which varies on the interval $[-3,3]$.

Let's find the maximum and minimum values of the function $z(x)$ on the specified interval. Differentiating this function, we get $z^{\prime}(x)=8 x$. From the equation $z^{\prime}(x)=0$ we find the only critical point $x_{1}=0$,
at which the function $z(x)$ has the value $z_{1}=-18$. Let's calculate its values at the endpoints of the interval $[-3,3]$, i.e., at the points $x=-3, x=3$:

$$
\begin{gathered}
z_{2}=z(-3)=4(-3)^{2}-18=18 \\
z_{3}=z(3)=4 \cdot 3^{2}-18=18
\end{gathered}
$$

Comparing the numbers $z_{0}, z_{1}, z_{2}, z_{3}$, we conclude that the function $z=2 x^{2}-2 y^{2}$ has a maximum value of 18 and a minimum value of -18, and:

$$
\begin{gathered}
z_{\text {max }}=f(-3,0)=f(3,0)=18 \\
z_{\text {min }}=f(0,-3)=f(0,3)=-18
\end{gathered}
$$

Remark. The maximum and minimum values of the function on the boundary of the domain could also have been found in another way. The circle $x^{2}+y^{2}=9$ has the following parametric equations:

$$
x=3 \cos t ; y=3 \sin t(0 \leq t \leq 2 \pi)
$$

Substituting these expressions for $x$ and $y$ into the formula $z=2 x^{2}-2 y^{2}$, we get a function of one variable $t$:

$$
z(t)=2(3 \cos t)^{2}-2(3 \sin t)^{2}=18\left(\cos ^{2} t-\sin ^{2} t\right)
$$

or

$$
z(t)=18 \cos 2 t,
$$

for which $z^{\prime}(t)=-36 \sin 2 t$. On the interval $[0,2 \pi]$ the function $z(t)=18 \cos 2 t$ has critical points $t_{1}=0, t_{2}=\frac{\pi}{2}, t_{3}=\pi, t_{4}=\frac{3}{2} \pi$, corresponding to the following values of the function:

$$
\begin{aligned}
& z_{1}=z\left(t_{1}\right)=18 ; z_{2}=z\left(t_{2}\right)=-18 \\
& z_{3}=z\left(t_{3}\right)=18 ; z_{4}=z\left(t_{4}\right)=-18
\end{aligned}
$$