My goal is to set up the triple integral that will solve for the volume inside the sphere $x^2 + y^2 + z^2 = 2z$ and above the paraboloid $x^2 + y^2 = z$ using cylindrical coordinates.
Upon solving, I know that the intersection of the sphere and the paraboloid is r = 1 and the bounds for $\theta$ is $0 \leq \theta \leq 2\pi$.
However, I am uncertain for the bounds of the z variable. I solve for the value of z in converted equation of the sphere $r^2 + z^2 = 2z$. By quadratic formula, I got the value of
$$ z = \frac{2 \pm \sqrt{4 - 4r^2}}{2}$$
Should I only include $z = \frac{1}{2} (2 + \sqrt{4-4r^2})$ as one of the bounds in the z variable? Or there will be a split integral? My yielding triple integral in this case if I only include $z = \frac{1}{2} (2 + \sqrt{4-4r^2})$ would be
$$ \int_0^{2\pi} \int_0^1 \int_{r^2}^{\frac{1}{2}(2+\sqrt{4-4r^2})} r dzdrd\theta$$