1.25. Find the mass of the substance filling the common part of two spheres $x^{2}+y^{2}+z^{2}=R^{2}$ and $x^{2}+y^{2}+z^{2}=2 R z$, if the volumetric density of the substance at each point is proportional to the distance from the plane XOY.
Solution. The projection of the body onto the XOY plane is a circle, the radius of which is determined from the equation $r^{2}_{0}=$ $=x^{2}+y^{2}=R^{2}-z^{2}$, where $z=\frac{R}{2}$ (this is obtained by solving the equations of the two spheres simultaneously). Thus, $r_{0}=\frac{\sqrt{3}}{2} R$. In this problem, as in the previous ones, we will also switch to cylindrical coordinates. In this case, the region

$$
D=\left\{(r, \varphi, z): \varphi \in[0,2 \pi] ; \quad 0 \leqslant r \leqslant r_{0} ; R-\sqrt{R^{2}-r^{2}} \leqslant z \leqslant \sqrt{R^{2}-r^{2}}\right\}
$$

The mass of the body in the cylindrical coordinate system is calculated by the formula

$$
M=\iiint_{D} p \cdot r d r d \varphi d z
$$

where $p=k z$ is the volume density of the material ($k=$ const). We perform the calculations:

$$
\begin{gathered}
M=k \int_{0}^{2 \pi} d \varphi \int_{0}^{r_{0}} r d r \int_{R-\sqrt{R^{2}-r^{2}}}^{\sqrt{R^{2}-r^{2}}} z d z= \\
=k \pi \int_{0}^{\frac{\sqrt{3}}{2} R}\left(R^{2}-r^{2}-\left(R-\sqrt{R^{2}-r^{2}}\right)^{2}\right) r d r= \\
=k \pi \int_{0}^{\frac{\sqrt{3}}{2} R}\left(2 R \sqrt{R^{2}-r^{2}}-R^{2}\right) r d r= \\
=\left.k \pi\left(-\frac{2 R}{3}\left(R^{2}-r^{2}\right)^{\frac{3}{2}}-\frac{R^{2} r^{2}}{2}\right)\right|_{0} ^{\frac{\sqrt{3}}{2} R}=\frac{-5 \pi K}{24} R^{4}
\end{gathered}
$$