Find $$\iiint_R (x^2+y^2+z^2)\,dV\,,$$ where $R$ is the region that lies above the cone $z=c \sqrt{x^2+y^2}$ and inside the sphere $x^2+y^2+z^2=a^2$.
I switched to spherical coordinates, but I'm having trouble with the borders for $\phi$. Now I have $$\int_0^{2\pi} d\theta \int_0^a R^4 \,dR\int_0^{...} \sin(\phi)\, d\phi$$
I don't know what should be on the $...$ in the integral. Or perhaps I'm using the wrong coordinates.
Someone told me it should be $\arctan(\frac{1}{c})$, but I'm not sure why.
Hint: the intersection is determined by $$z^2 = c^2(x^2 + y^2) = c^2(a^2- z^2)\implies z = \cdots$$ and now you can use $z = R\cos\phi$.