I have to get the volume of the set $E=\{(x,y,z) : x^2+y^2+z^2 \leq r^2, x^2+y^2-rx \geq 0, x^2+y^2+rx \geq 0\}$.
Are spherical coordinates the best way to go?, because if i put $$x = p\cos\theta\sin\psi \\ y= p\sin\theta\sin\psi \\ z = p\cos\psi$$ i know that because of $x^2+y^2+z^2 \leq r^2$ must be $|p| \leq |r|$, but how do i get the limits of integration for $\theta$ and $\psi$?.
I have that $x^2+y^2-rx \geq 0 \iff p^2\cos^2\theta\sin^2\psi + p^2\sin^2\theta\sin^2\psi - rpcos \theta\sin\psi \geq 0 \iff p\sin\psi(p\sin\psi - r\cos\theta) \geq 0$
And also $x^2+y^2+rx \geq 0 \iff p\sin\psi(p\sin\psi + r\cos\theta) \geq 0$.
Does that mean that i should find $\theta$ and $\psi$ such that $\displaystyle\frac{p\sin\psi - r\cos\theta}{p\sin\psi + r\cos\theta} \geq 0$ ?.
How can i solve an equation like the last one?
It seems to me that using Cylindrical coordinates will make our job easier. As you see, our region is symmetric so it is enough to consider $1/8$ of whole volume such that $x\ge 0, y\ge 0,z\ge 0$:
Now let's look at the bottom of above region which is on $z=0$:
So the limits are as follows: $$\theta|_0^{\pi/2},~~r|_{a\cos\theta}^a,~~z|_0^{\sqrt{a^2-r^2}}$$
Note: for plots I assumed that $a=2$ and $a$ is $r$ in your original equations.