Example 3.25. Find the gradient of the function $z=x^{2}-x y+y^{3}$ at the point $A(1, -1)$ and the derivative in the direction of the vector $\bar{a}=3 \bar{i}-4 \bar{j}$.
Solution. The partial derivatives are:

$$
\frac{\partial z}{\partial x}=2 x-y, \quad \frac{\partial z}{\partial y}=-x+3 y^{2}
$$

By formula (3.12):

$$
\begin{aligned}
\left.\operatorname{grad} z\right|_{A}= & \frac{\partial z}{\partial x} \bar{l}+\frac{\partial z}{\partial y} \bar{j} \quad=(2 x-y)_{A} \cdot \bar{l}+\left(-x+3 y^{2}\right)_{A} \cdot \bar{j}= \\
& =(2 \cdot 1-(-1)) \bar{\imath}+\left(-1+3(-1)^{2}\right) \bar{j}=3 \bar{\imath}+2 \bar{j}
\end{aligned}
$$

The directional derivative by formula (3.11) is:

$$
\left.\frac{\partial z}{\partial a}\right|_{A}=\left.\frac{\partial z}{\partial x}\right|_{A} \cdot \frac{3}{\sqrt{3^{2}+(-4)^{2}}}+\left.\frac{\partial z}{\partial y}\right|_{A} \cdot \frac{(-4)}{\sqrt{3^{2}+(-4)^{2}}}=\frac{1}{5}(3 \cdot 3+2(-4))=\frac{1}{5}
$$

Using partial derivatives, we can solve problems of finding the extremum of a function of several variables.

The points at which a differentiable function $f(x ; y)$ can achieve an extremum (so-called stationary points) are found by solving the system of equations

$$
\begin{aligned}
& f_{x}^{\prime}(x ; y)=0, \\
& f_{y}^{\prime}(x ; y)=0
\end{aligned}
$$

(necessary conditions for an extremum).

Sufficient conditions for the existence of an extremum of a function of two variables are as follows: let $f_{x}^{\prime}(a ; b)=f_{y}^{\prime}(a ; b)=0$ and $A=f_{x x}^{\prime \prime}(a ; b), B=f_{x y}^{\prime \prime}(a ; b), C=f_{y y}^{\prime \prime}(a ; b)$. Construct the discriminant

$$
\Delta=A \cdot C-B^{2}
$$

Then: 1) if $\Delta>0$, the function has an extremum at point $P(a ; b)$, specifically, a maximum if $A<0$ (or $C<0$), and a minimum if $A>0$ (or $C>0$); 2) if $\Delta<0$, there is no extremum at point $P$; 3) if $\Delta=0$, the question of the existence of an extremum at point $P$ remains open (further investigation is required).