5.2.3. Find the maximum and minimum values of the function

$$
z=4 x^{2}+y^{2}-16 x-4 y+20
$$

in the closed domain $D$, defined by the inequalities:

$$
x \geq 0, \quad x-2 y \leq 0, \quad x+y-6 \leq 0 .
$$
## Solution.

a) Let's find the partial derivatives and set them to zero (necessary conditions for extremum):

$$
\begin{gathered}
\frac{\partial z}{\partial x}=\left(4 x^{2}+y^{2}-16 x-4 y+20\right)_{x}^{\prime}=8 x-16 \\
\frac{\partial z}{\partial x}=0 ; 8 x-16=0 ; x_{0}=2 \\
\frac{\partial z}{\partial y}=\left(4 x^{2}+y^{2}-16 x-4 y+20\right)_{y}^{\prime}=2 y-4 \\
\frac{\partial z}{\partial y}=0 ; 2 y-4=0 ; y_{0}=2
\end{gathered}
$$

The stationary point \( x_{0}=2, y_{0}=2 \) lies within the closed region, since: \( 2 \geq 0 ; 2-2 \cdot 20 \). Therefore, the function has an extremum at point \( M \), specifically a minimum, because \( A=8>0 \); \( z_{\text {min }}(2 ; 2)=4 \cdot 2^{2}+2^{2}-16 \cdot 2-4 \cdot 2+20=0 \).

b) Let's construct the closed region \( O A B \) (Fig. 56).

![](https://cdn.mathpix.com/cropped/2024_05_22_e915d089cc29fd681be5g-242.jpg?height=540&width=510&top_left_y=256&top_left_x=473)

Fig. 56

Consider the contour \( x=0 \) (line \( O A \)). We have the function of one variable: \( z=y^{2}-4 y+20 \). Let's investigate it for extremum:

$$
z^{\prime}=2 y-4
$$

From \( z^{\prime}=0 \) we get \( 2 y-4=0 \) or \( y=2 \). Since

$$
z^{\prime \prime}(2)=(2 y-4)_{y=2}^{\prime}=(2)_{y=2}=2>0,
$$

we have a minimum and \( z_{C}=z(2)=2^{2}-4 \cdot 2+20=16 \).

Next, consider the contour \( x+y-6=0 \) or \( y=6-x \) (line \( A B \)). We have:

$$
z=4 x^{2}+(6-x)^{2}-16 x-4(6-x)+20
$$

or

$$
z=5 x^{2}-24 x+32
$$

Find \( z^{\prime}=10 x-24 \) and from \( z^{\prime}=0 \) we get \( 10 x-24=0 \), or \( x=\frac{12}{5} \). Since \( z^{\prime \prime}=(10 x-24)^{\prime}=10>0 \), we have a minimum at \( x=\frac{12}{5} \) and \( z_{D}=z \left(\frac{12}{5}\right)=5 \cdot \left(\frac{12}{5}\right)^{2}-24 \cdot \frac{12}{5}+32=\frac{16}{5} \).

On the contour \( x-2 y=0 \) or \( x=2 y \) (line \( O B \)) we have \( z=4(2 y)^{2}+y^{2}-16 \cdot 2 y-4 y+20 \) or \( z=17 y^{2}-36 y+20 \). Find the derivative \( z^{\prime}=\left(17 y^{2}-36 y+20\right)^{\prime}=34 y-36 \), set it to zero \( z^{\prime}=0 \) or \( 34 y-36=0 \), hence \( y=\frac{18}{17} \).

Since \( z^{\prime \prime}=(34 y-36)^{\prime}=34>0 \), we have a minimum at \( y=\frac{18}{17} \) and \( z_{E}=17 \left(\frac{18}{17}\right)^{2}-36 \cdot \frac{18}{17}+20=\frac{16}{17} \).

Find the values of the function \( z \) at points \( O(0 ; 0), A(0 ; 6) \) and \( B(4 ; 2) \):

$$
\begin{gathered}
z_{0}=20 ; z_{A}=4 \cdot 0+6^{2}-16 \cdot 0-4 \cdot 6+20=32 \\
z_{B}=4 \cdot 4^{2}+2^{2}-16 \cdot 4-4 \cdot 2+20=16
\end{gathered}
$$

From the found values \( z_{\text {min }}=0 ; z_{C}=16 ; z_{D}=\frac{16}{5} ; \quad z_{E}=\frac{16}{17} \); \( z_{0}=20 ; z_{A}=32 ; z_{B}=16 \), we select the smallest and largest. We get that \( z_{\text {min }}=0, z_{\text {max }}=32 \).

## 8. DIFFERENTIAL EQUATIONS

## 8.1. First-Order Equations