I'm asked to compute the volume of following integral in cylindrical and spherical coordinates: $$\int_0^{2R} \int_{-\sqrt{2Rx-x^2}}^\sqrt{2Rx-x^2} \int_0^\sqrt{4R^2 - x^2 - y^2}dx\ dy\ dz$$
I know that: $$y^2 = 2Rx - x^2$$ what leaves me with: $$u = 2Rcos(t)$$ and: $$-\frac{\pi}{2} \le t \le \frac{\pi}{2}$$ A cylindrical representation is then given by: $$\int_{-\frac{\pi}{2}}^\frac{\pi}{2} \int_0^{2Rcos(t)} \int_0^\sqrt{4R^2 -u^2} u\ dz\ du\ dt = \frac{8}{3}(\pi - \frac{4}{3})R^3$$
Now, for the spherical part I'm stuck. I don't know how I would be able to describe the part of the sphere inside the cylinder. I'm guessing that the interval for $t$ changes (depending on where $\phi$ is)? Any hints?
Also I take $\textbf{t}\ (\text{x-y plane}),\ \boldsymbol{\phi}\ (\text{x-z plane})\ \text{and}\ \textbf{r}\ (\text{the radius})$.
In spherical coordinates, the sphere $x^2+y^2+z^2=4R^2$ has equation $\rho=2R$ while the cylinder $x^2+y^2=2Rx$ has equation $\rho=\frac{2R\cos(\theta)}{\sin(\phi)}$. These two surfaces intersect whenever $\sin(\phi)=\cos(\theta).$ Since we're working in the region of space above the $xy-$plane, we can say that $0\leq\phi\leq\pi/2$ and so $\phi=\arcsin(\cos(\theta))$. In other words, the upper half of the sphere $\rho=2R$ intersects the cylinder $\rho=\frac{2R\cos(\theta)}{\sin(\phi)}$ along the curve represented in spherical form $$(\rho,\phi,\theta)=\big(2R,\arcsin(\cos(\theta)),\theta\big):\theta\in[-\pi/2,\pi/2]$$ Try to visually reason that this integral breaks apart into two pieces as $$\int_{-\pi/2}^{\pi/2}\int_{0}^{\arcsin(\cos(\theta))}\int_{0}^{2R}\rho^2\sin(\phi)d\rho d\phi d\theta + \int_{-\pi/2}^{\pi/2}\int_{\arcsin(\cos(\theta))}^{\pi/2}\int_{0}^\frac{2R\cos(\theta)}{\sin(\phi)}\rho^2\sin(\phi)d\rho d\phi d\theta$$