Example 1. Calculate the flux of the vector field $\mathbf{a}=x^{2} \mathbf{i}+y^{2} \mathbf{j}+z^{2} \mathbf{k}$ through the closed surface $x^{2}+y^{2}+z^{2}=R^{2}, z=0(z>0)$.
Solution. By formula (I)

$$
\Pi=\iiint_{V}(2 x+2 y+2 z) d v
$$

It is convenient to calculate the integral (2) in spherical coordinates $r, \boldsymbol{\theta}, \varphi$. We have

$$
x=r \sin \theta \cos \varphi, \quad y=r \sin \theta \sin \varphi, \quad z=r \cos \theta
$$

and the volume element

$$
d v=r^{2} \sin \theta d r d \theta d \varphi
$$

$$
\Pi=2 \iiint(r \sin \theta \cos \varphi+r \sin \theta \sin \varphi+r \cos \theta) r^{2} \sin \theta d r d \theta d \varphi=2 \int_{0}^{2 \pi} d \varphi \int_{0}^{\pi / 2} \sin \theta(\sin \theta \cos \varphi+\sin \theta \sin \varphi+\cos \theta) d \theta \int_{0}^{k} r^{3} d r=
$$

$$
=\frac{2 R^{4}}{4} \int_{0}^{2 \pi} d \varphi \int_{0}^{\pi / 2} \cos \theta \sin \theta d \theta=\frac{\pi R^{4}}{2}
$$