Evaluate a triple integral with spherical coordinates $$\iiint_{Q}z\ dV$$ Where $Q$ is the common region of the spheres $x^{2}+y^{2}+z^{2}\leq 1$ and $x^{2}+y^{2}+(z-1)^{2}\leq 1$
I have tried nothing.
 A: Switching to polar coordinates $I=\int_Vzrdrd\theta dz$. Limits $0\le \theta\le 2\pi$.  For $(r,z)$  The area of interest is the overlap of two unit circles in the $(r,z)$ plane centered at $(0,0)$ and $(0,1)$  The circles intersect at $z=\frac{1}{2}$.  Using the symmetry around the $z$ axis the net result is:
$I=4\pi(\int_0^\frac{1}{2}z\int _0^\sqrt{1-(1-z)^2}rdrdz+\int_\frac{1}{2}^1z\int _0^\sqrt{1-z^2}rdrdz)=2\pi(\int_0^\frac{1}{2}z(1-(1-z)^2)dz+\int_\frac{1}{2}^1z(1-z^2)dz)$
A: The triple integral in spherical coordinates consists of two integrals, whose limits are determined by the intersection of the two circles $x^{2}+y^{2}+z^{2}=1$ and $x^{2}+y^{2}+(z-1)^{2}=1$. They intersect at $z=\frac12$, or $\theta = \frac\pi3$. So, the $\theta$-limits in the spherical coordinates are $(0,\frac\pi3)$ and $(\frac\pi3,\frac\pi2)$
Thus, the volume integral is,
$$2\pi\int_0^{\frac\pi3}\int_0^1 (r\cos\theta)\>r^2\sin\theta\>dr d\theta
+2\pi\int_{\frac\pi3}^{\frac\pi2}\int_0^{2\cos\theta} (r\cos\theta)\>r^2\sin\theta\>dr d\theta
=\frac{3\pi}{16}+\frac{\pi}{48}=\frac{5\pi}{24}$$
A: We have to use spherical coordinates $(x=r\sin\theta\cos\varphi, \quad y=r\sin\theta\sin\varphi, z=r\cos\theta)$, so we will have $$x^2+y^2+z^2 \le 1 \Leftrightarrow r^2 \le 1 \Leftrightarrow r \le 1$$ and $$x^2+y^2+(z-1)^2 \le 1 \Leftrightarrow x^2+y^2+z^2 \le 2z \Leftrightarrow r^2 \le 2r\cos\theta \Leftrightarrow r \le 2\cos\theta.$$
Next, since both spheres have their centers on $z$-axis, one center is $P_1=(0,0,0)$ and another one is $P_2=(0,0,1)$ we know that it will hold: $$0 \le \varphi\le 2\pi,$$ and since both spheres have radius $1$ it is not hard to see that it will hold: $$0 \le \theta \le \frac{\pi}{2}.$$
Finally, your integral will be equal to $$\int_{0}^{2\pi}d\varphi \int_{0}^{\frac{\pi}{2}}\sin\theta \cos\theta d\theta \int_{2\cos\theta}^{1}r^3 dr=2\pi\int_{0}^{\frac{\pi}{2}}\sin\theta \cos\theta(\frac{1}{4} - 4\cos^4\theta)d\theta =...= \frac{-13\pi}{12}.$$
