$\iiint_vz^2\, \mathrm dx \, \mathrm dy\, \mathrm dz$, $x^2 +y^2 +(z-R)^2\leq R^2$ $\iiint_vz^2dxdydz$, $x^2 +y^2 +(z-R)^2\leq R^2$.

$\theta$ interval will be from $0$ to $2\pi$. I substituted $x^2 +y^2$ for $r^2$ and got $(z-R)^2\leq R^2 -r^2$. Thus $z\in[R-\sqrt{R^2-r^2}, R +\sqrt{R^2 -r^2}]$ and $r$ belongs to $[0,R]$. Is that correct, because I got $0$ from calculating triple integral (understandable, since there is no $\theta$ in primary function $z^2$ or in any interval). Is it correct?
 A: I would suggest using a transformed spherical coordinate system instead of cylindrical. Let
$$\begin{cases}x=\rho\cos\theta\sin\varphi\\y=\rho\sin\theta\sin\varphi\\z=\rho\cos\varphi+R\end{cases}\implies\mathrm dV=\rho^2\sin\varphi\,\mathrm d\rho\,\mathrm d\theta\,\mathrm d\varphi$$
The region $V$ in these coordinates is the set
$$V=\left\{(\rho,\theta\,\varphi)\mid0\le\rho\le R,0\le\theta\le2\pi,0\le\varphi\le\pi\right\}$$
and the integral is equivalent to
$$\iiint_Vz^2\,\mathrm dV=\int_0^\pi\int_0^{2\pi}\int_0^R(\rho\cos\varphi+R)^2\rho^2\sin\varphi\,\mathrm d\rho\,\mathrm d\theta\,\mathrm d\varphi=\boxed{\frac{8\pi R^5}5}$$

If you insist on using cylindrical coordinates, letting
$$\begin{cases}x=r\cos\theta\\y=r\sin\theta\\z=z\end{cases}\implies\mathrm dV=r\,\mathrm dr\,\mathrm d\theta\,\mathrm dz,$$
then the integral is
$$\iiint_Vz^2\,\mathrm dV=\int_0^{2\pi}\int_0^R\int_{R-\sqrt{R^2-r^2}}^{R+\sqrt{R^2-r^2}}z^2r\,\mathrm dz\,\mathrm dr\,\mathrm d\theta$$
The integral with respect to $\theta$ is simply $2\pi$:
$$2\pi\int_0^R\int_{R-\sqrt{R^2-r^2}}^{R+\sqrt{R^2-r^2}}z^2r\,\mathrm dz\,\mathrm dr=\frac{2\pi}3\int_0^R\left(\left(R+\sqrt{R^2-r^2}\right)^3-\left(R-\sqrt{R^2-r^2}\right)^3\right)r\,\mathrm dr$$
Substitute $s=R^2-r^2$, so that $\mathrm ds=-2r\,\mathrm dr$, and expand/simplify the binomials in the integrand to get
$$\frac\pi3\int_0^{R^2}\left(\left(R+\sqrt s\right)^3-\left(R-\sqrt s\right)^3\right)\,\mathrm ds=\frac\pi3\int_0^{R^2}\left(6R^2s+2s^{3/2}\right)\,\mathrm ds=\boxed{\frac{8\pi R^5}5}$$
as expected.
