We have a 3D body $G=\left \{ (x,y,z):x^2+y^2+z^2\leq a^2,0\leq z\leq\sqrt{x^2+y^2}\right \}$
Defining $I_0=\iiint_G \,dx\,dy\,dz$, $I_1=\iiint_G z\,dx\,dy\,dz$
For which $a\in\mathbb{N}$ we get that $\frac{I_1}{I_0}=\frac{3\sqrt2}{4}$?
My first step was to convert into Spherical coordinate system, thus we get that $x^2+y^2+z^2=r^2$ then $0\leq r\leq a$
and $0 \leq r\cos(\varphi) \ \leq \sqrt{(r\sin(\varphi )\cos(\theta))^2+(rsin(\varphi )sin(\theta))^2}$ from converting $0\leq z\leq\sqrt{x^2+y^2}$,
now I think I need to solve the equation for $\cos(\varphi)^2 \ = (\sin(\varphi )\cos(\theta))^2+(\sin(\varphi )sin(\theta))^2$?
$$\cos(\varphi)^2 \ = (\sin(\varphi )\cos(\theta))^2+(\sin(\varphi )\sin(\theta))^2$$ $$\cos(\varphi)^2 \ = (\cos^2(\theta)+\sin^2(\theta))\ \sin^2(\varphi)$$ $$\cos(\varphi)^2 =\sin^2(\varphi)$$ $$\tan(\varphi)=1$$ $$-\frac{\pi}{4} \leq \varphi \leq \frac{\pi}{4} $$ and for $\theta$ it's $0 \leq \theta \leq 2\pi$
So the end we have
$0\leq r\leq a$
$0 \leq \theta \leq 2\pi$
$-\frac{\pi}{4} \leq \varphi \leq \frac{\pi}{4} $
Am I correct from here?
In spherical coordinates, $x = \rho \cos\theta \sin\phi, y = \rho \sin\theta \sin\phi, z = \rho \cos\phi$
Here we have $0 \leq \rho \leq a, 0 \leq \theta \leq 2\pi$. For limits of $\phi$,
Please note the lower bound of $z$ in the given condition, $0 \leq z \leq \sqrt{x^2+y^2}$
As you calculated, $2a^2\cos^2\phi = a^2 \implies \cos \phi = \pm \frac{1}{\sqrt2}, \phi = \frac{\pi}{4}, \frac{3\pi}{4}$
But as $z \geq 0, \phi \leq \frac{\pi}{2}$
So the limits of $\phi \ $ is $ \ \frac{\pi}{4} \leq \phi \leq \frac{\pi}{2}$
$I_0 = \displaystyle \int_0^{2\pi}\int_{\pi/4}^{\pi/2}\int_0^a \rho^2 \sin\phi \ d\rho \ d\phi \ d\theta = \frac{\sqrt2 \pi a^3}{3}$
$I_1 = \displaystyle \int_0^{2\pi}\int_{\pi/4}^{\pi/2}\int_0^a \rho^3 \sin\phi \cos \phi \ d\rho \ d\phi \ d\theta = \frac{\pi a^4}{8}$