Example 4. Find the flux of the vector field $\mathbf{a} = (x-2z)\mathbf{i} + (x+3y+z)\mathbf{j} + (5x+y)\mathbf{k}$ through the upper side of the triangle $ABC$ with vertices at points $A(1,0,0)$, $B(0,1,0)$, $C(0,0,1)$.
Solution. The equation of the plane in which triangle $ABC$ lies is $z+y+z=1$, from which $z=1-x-y$. Triangle $ABC$ is projected one-to-one onto the $xOy$ plane into the region $D_{xy}$, which is the triangle $OAB$ (Fig. 18).

By the condition, the normal $\boldsymbol{n}^{0}$ to the plane in which triangle $ABC$ lies forms an acute angle $\gamma$ with the $Oz$ axis, so in formula (2) we take the plus sign and obtain

$$
\mathbf{n}^{n}=\frac{\operatorname{grad}(x+y+z-1)}{|\operatorname{grad}(x+y+z-1)|}=\frac{1}{\sqrt{3}} \mathbf{i}+\frac{1}{\sqrt{3}} \mathbf{j}+\frac{1}{\sqrt{3}} \mathbf{k}
$$

We find the scalar product

$$
\left(\mathbf{a}, \mathbf{n}^{0}\right)=(x-2z) \frac{1}{\sqrt{3}}+(x+3y+z) \frac{1}{\sqrt{3}}+(5x+y) \frac{1}{\sqrt{3}}=\frac{7x+4y-z}{\sqrt{3}}.
$$

From formula (6) we get that $\cos \gamma=\frac{1}{\sqrt{3}}>0$ and, therefore,

$$
dS=\frac{dxdy}{\cos \gamma}=\sqrt{3} dxdy
$$

Applying formula (1), we compute the desired flux:

$$
\begin{aligned}
& \square=\iint_{S}\left(\mathbf{a}, \mathbf{n}^{0}\right) dS=\left.\iint_{D_{xy}}(7x+4y-z)\right|_{z=1-x-y} dxdy= \\
& \quad=\iint_{D_{xy}}(8x+5y-1) dxdy=\int_{0}^{1} dx \int_{0}^{1-x}(8x+5y-1) dy=\frac{5}{3}
\end{aligned}
$$