How to calculate the volume of this set using spherical coordinates?

Let

$$K = \left\{(x, y, z) \in \mathbb R^3 ; \; x^2 + y^2 + z^2 < b^2, \, x^2 + y^2 > a^2 \right\}.$$

How to calculate the volume of $K$ using spherical coordinates?


I know that the conditions translate to $r < b$ and $r \sin \theta > a$ but I really struggle to get the right integral. Could someone explain, please?


Assuming $a<b$. Put $$ x=r\cos\phi\sin\theta,\quad y = r\sin\phi\sin\theta,\quad z = r\cos\theta $$ where $\phi\in (0,2\pi)$ and $\theta \in (0,\pi)$.

The picture is symmetrical, so it suffices to let $\theta \in (0,\pi/2)$. $$\frac{1}{2}V = \int _{0}^{2\pi} \int _{\arcsin (a/b)}^{\pi/2} \int _{\frac{a}{\sin\theta}}^{b} J\mathrm{d}r\mathrm{d}\theta\mathrm{d}\phi $$ where $J$ is the Jacobian.

enter image description here