Region D is bounded by below by $z=0$, and above by $x^2+y^2+z^2=4$, and on sides $x^2+y^2=1$ is required to be setup in spherical coordinate I started Spherical coordinate literally yesterday so please bear with me, im still fairly new to the topic, so i came upon this question and graphically it should look like this to me

I already have the final answer given by :$\displaystyle\int _0^{2\pi }\int _0^2\int _0^{\frac{\pi }{6}}\rho \ ^2\sin \phi \ d\phi \ d\rho \ d\theta +\ \ \int _0^{2\pi }\int _0^1\int _{\frac{\pi }{6}}^{\frac{\pi }{2}}\rho \ ^2\sin \phi \ d\phi \ d\rho \ d\theta +\ \int _0^{2\pi }\int _1^2\int _{\frac{\pi }{6}}^{\sin ^{-1}\left(\frac{1}{\rho \ }\right)}\rho \ ^2\sin \phi \ d\phi \ d\rho \ d\theta \ $
i understood the limit for $\theta$ which is $0<\theta <2\pi $, I even understood why we took $0<\rho \ <1$ and $0<\rho \ <2$ and $1<\rho <2$
what i didn't understand at all are these $\phi $ angles limits ($\sin ^{-1}\left(\frac{1}{\rho }\ \right), \frac{\pi }{6},\frac{\pi }{2}$) I want to be able to form the limits of these $\phi$ on my own but I'm thoroughly confused. Please if anybody can help explain the limits of the $\phi$, it'd be greatly appreciated.
Also side note: this particular example has already been asked once but i didnt understand the answer that was given to that question which is why im asking again. So please kindly don't mark this as duplicate, thank you.
 A: As an aside, I find the integrating bounds easier to set up if you integrate in the order $d\rho d\phi d\theta$.
Use the formulas $z=\rho \cos(\phi)$, $r=\rho \sin(\phi)$, $x=r\cos(\theta)=\rho \sin(\phi)\cos(\theta)$, $y=r\sin(\theta)=\rho \sin(\phi)\sin(\theta)$.
The first integral is easy to understand, since $\rho$ is always integrating from $0$ to the sphere of radius $\rho=2$. The angle $\phi$ starts at $0$ on the positive $z$ axis and the integral stops just shooting $\rho=0$ to $\rho=2$ when the sphere intersects the cylinder. Note that by symmetry with respect to $\theta$, this intersection will hold for all $\theta$. Hence, when the cylinder $x^2+y^2=1$ intersects $x^2+y^2+z^2=4$ (so $\rho=2$), this implies $z=\sqrt{3}$ so $2\cos(\phi)=\sqrt{3} \implies \phi=\frac{\pi}{6}$
Thus, the setup for the first region is done.
For the other region, we consider as we keep increasing $\phi$ beyond $\frac{\pi}{6}$. For this region, the integration with respect to $\rho$ is always from $0$ to the cylinder, with $\frac{\pi}{6}\leq \phi \leq \frac{\pi}{2}$. In this region, $x^2+y^2=1$ so $r=1$. From the formula above, this means $1=\rho\sin(\phi)$. As we can see, we can either set up the integration to be $\rho=0$ to $\rho=\frac{1}{\sin(\phi)}$ with $\phi=\frac{\pi}{6}$ to  $\phi=\frac{\pi}{2}$, or set it up so that we first integrate we respect to $\phi$, then $\rho$ (which is what your answer has).
To see why this splits as two integrals with the order $d\phi d\rho$, make a $\phi$-$\rho$ plot with the $y$-axis being $\rho$ and the $x$-axis being $\phi$. Plot the function $\rho(\phi)=\frac{1}{\sin(\phi)}$ for $\frac{\pi}{6}\leq \phi \leq \frac{\pi}{2}$.

If you integrate with respect to $\phi$ first, you are integrating from $\phi=\frac{\pi}{6}$ to $\frac{\pi}{2}$ when $0\leq \rho \leq 1$. After that, $\phi$ goes from $\phi=\frac{\pi}{6}$ to $\phi=\arcsin(\frac{1}{\rho})$. This occurs from $\rho=1$ to $\rho=2$.
As I mentioned above, if you take this same picture, but integrate with respect to $\rho$ first, you are always integrating $\rho=0$ to $\rho=\frac{1}{\sin(\phi)}$. And this occurs from $\phi=\frac{\pi}{6}$ to $\phi=\frac{\pi}{2}$.
