<s>[INST] I don't agree this evaluation of the volume of $E=\{(x,y,z) \in \mathbb{R}^3 \ | \ 4 \leq x^2+y^2+z^2 \leq 9, x^2+y^2 \geq 1\}$ I've found the following solution of the problem "Evaluate the volume of $E=\{(x,y,z) \in \mathbb{R}^3 \ | \ 4 \leq x^2+y^2+z^2 \leq 9, x^2+y^2  \geq 1\}$.", but I don't agree with that from some point to the end, can someone help me understand if I'm wrong or right?
The set is even in all the three coordinates $x=r \cos t,\, y=r \sin t,\, z=z$ with $r \geq 0$ and $0 \leq t \leq 2\pi$, the volume is given by $8$ times the volume of the set
$F=\{\{(x,y,z) \in \mathbb{R}^3 \ | \ 4 \leq x^2+y^2+z^2 \leq 9, x^2+y^2  \geq 1, x \geq0,y\geq0,z\geq0\}$.
Using cylindrical coordinates, we get that $F$ becomes the set
$$G=\{(r,t,z) \in \mathbb{R}^3 \ | \ 4 \leq r^2+z^2 \leq 9,r^2\geq1, r\cos t \geq 0, r \sin t \geq0,z\geq0\}$$
$$=\{(r,t,z) \in \mathbb{R}^3 \ | \ 4-r^2 \leq z^2 \leq 9-z^2,r\geq1, 0 \leq t \leq \pi/2 ,z \geq 0\}$$
Now it is $4-r^2 \leq z^2 \leq 9-r^2 \iff \sqrt{4-r^2} \leq z \leq \sqrt{9-r^2}$ with the conditions $4-r^2 \geq 0$ and $9-r^2 \geq 0$; those two conditions together and the fact that $r \geq 1$ lead to $1 \leq r \leq 2$; since it must be $z \geq 0$ and $z \geq \sqrt{4-r^2}$, being the root always nonnegative it is $z \geq \sqrt{4-r^2}$. So in my opinion it should be
$$\text{Volume}(E)=8\iiint_G rdrdtdz=8\int_0^{\pi/2}\int_1^2 \int_{\sqrt{4-r^2}}^{\sqrt{9-r^2}}rdzdrdt$$
However the solution uses my same reasoning except when it must be discussed the interval of integration for $z$: it says that we must split the integral in the sum of these two integrals and so according to the solution it should be
$$\text{Volume}(E)=8\int_0^{\pi/2}\int_1^2 \int_{\sqrt{4-r^2}}^{\sqrt{9-r^2}}rdzdrdt+8\int_0^{\pi/2}\int_2^3 \int_{0}^{\sqrt{9-r^2}}rdzdrdt$$
Because it says that the conditions $4 \leq r^2+z^2 \leq 9,z\geq 0$ are equivalent to the system
$$\begin{cases} z \leq -\sqrt{4-r^2} \vee z \geq \sqrt{4-r^2} \\ -\sqrt{9-r^2} \leq z \leq \sqrt{9-r^2} \\ z \geq 0\end{cases} \iff \begin{cases} z \geq \sqrt{4-r^2} \\ 0\ \leq z \leq \sqrt{9-r^2}\end{cases}$$
And it says that $\sqrt{4-r^2} \leq z \implies 4-r^2 \geq 0$ and $\sqrt{9-r^2} \geq z \implies 9-r^2 \geq 0$, so it has to split the integral in the sum of two integrals that have different intervals on $r$ because of those implications. But I don't understand this latter statement, because it is not like I'm having two different conditions from above or two different conditions from below on the variable $z$ that can vary according to the interval where $r$ belongs to, because it is always $\sqrt{4-r^2} \geq 0$ and so the two conditions $z \geq 0$ and $z \geq \sqrt{4-r^2}$ are basically the only one condition $z \geq \sqrt{4-r^2}$. Am I wrong or am I right? Thanks.
 [/INST] In cylindrical coordinates you get the set of conditions
$$
4\leqslant r^2+z^2\leqslant 9,\quad r^2\geqslant 1,\quad  r\cos t\geqslant 0,\quad r\sin t\geqslant 0,\quad  z\geqslant 0\tag1
$$
However these inequalities can be simplified a lot because in cylindrical coordinates $r\geqslant 0$ ever, so we get
$$
4\leqslant r^2+z^2\leqslant 9,\quad r\geqslant 1,\quad  \cos t\geqslant 0,\quad \sin t\geqslant 0,\quad  z\geqslant 0\tag2
$$
And so
$$
4\leqslant r^2+z^2\leqslant 9,\quad  z\geqslant 0,\quad r\geqslant 1,\quad 0\leqslant t\leqslant \frac{\pi }{2}\tag3
$$
Now, the inequality $4\leqslant  z^2+r^2\leqslant 9$ is satisfied for some $z$ if and only if $r\leqslant 3$, and together with the condition $r\geqslant 1$ we have that at most the range of $r$ is $[1,3]$. When $r\in[1,2]$ we have that the first inequality in (3) gives $z\in[\sqrt{4-r^2},\sqrt{9-r^2}]$ (because $z\geqslant 0$), and when $r\in[2,3]$ the inequality $4\leqslant r^2+z^2$ is trivially true for all values of $z$ so we only must care about the inequality $r^2+z^2\leqslant  9$, then in this case the range of $z$ is $[0,\sqrt{9-r^2}]$ (again, because $z\geqslant 0$).
These conditions are exactly the same of the given answer of your book.

I will add a different way to see it using set theory: let the conditions
$$
4-r^2\leqslant z^2\leqslant 9-r^2,\quad z\geqslant 0,\quad r\geqslant 1
$$
Then using intervals the conditions are equivalent to
$$
z^2\in [4-r^2,9-r^2]\cap [0,\infty )=[\max\{0,4-r^2\},9-r^2]
$$
and
$$
\max\{0,4-r^2\}=\begin{cases}
0,& r>2\\
4-r^2,&r\in[1,2]
\end{cases}
$$
Finally note when $r>3$ then the interval $[\max\{0,4-r^2\},9-r^2]$ is the empty set.
</s>