Find the integral $$\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$. (Here a and c are positive constants.) Simplify as far as possible.
I think I'm really close to the answer but can't seem to make it the last tiny part.
$$\iiint_R(x^2+y^2+z^2) \,dV = \int_0^adR\int d\phi \int_0^{2\pi}R^4\sin(\phi) d\theta$$ And also, $z = c\sqrt{x^2+y^2} = cR\sin(\phi)$. The only bit I've been stuck at for a long time now is: what should the integral bounds be for the $\int d\phi$?
If something is wrong or not in the right direction, please correct me. Thanks.
$\hskip1.8in$
I think it's easier to define $\phi$ as the colatitude, i.e. as the angle from the $z$-axis. This way, the variable $R$ ranges from $0$ to $a$, $\theta$ goes all round from $0$ to $2\pi$, and $\phi$ goes from some angle $0$ to $\phi_0$. Why? Intuitively, because for a fixed $\theta$ the other two variables define a two-dimensional "pizza slice" that has its vertex at the origin, one side lying on the $z$-axis, the other on the "inner" border surface of the cone, and the crust on the "inner" border surface of the sphere; letting $\theta$ vary from $0$ to $2\pi$ means rotating this pizza slice around the $z$-axis, effectively sweeping out the whole region $R$.
But what is this angle $\phi_0$? It encodes the steepness of the cone, which depends on the constant $c$. In the case $c = 1$ the cone makes an angle of $45^\circ$ with the $z$-axis, so $\phi_0 = \pi /4$; for general $c$, you should notice from the picture below that $$c = \cot \phi_0, $$ and so you can take the arccotangent.
$\hskip1.8in$
Now, we may transform our integral as follows: $$I(a,c)=\iiint_R (x^2+y^2+z^2)\ dV = \int_0^{2\pi}\int_0^a \int_0^{\cot^{–1} c} R^2 (R^2\sin\phi)\ d\phi\ dR\ d\theta,$$ which solves into $$I(a,c) = 2\pi \int_0^a R^4\ dR \int_0^{\cot^{–1} c} \sin\phi\ d\phi = 2\pi \frac{a^5}{5} \int_0^{\cot^{–1} c} \sin\phi\ d\phi. $$ The last integral may seem ugly to evaluate, but we can use the fact that (with $\lambda > 0$) $$\cos(\cot^{–1} \lambda) = \sqrt{\frac{\lambda^2}{\lambda^2 + 1}} = \frac{\lambda}{\sqrt{\lambda^2 + 1}}, $$ which is justified by letting $\lambda = \cot \alpha = \frac{\cos \alpha}{\sin \alpha}$ and by making use of the standard trigonometric identity $1 + \cot^2\alpha = \csc^2\alpha = \frac 1 {\sin^2 \alpha}$. So, all in all, $$I(a,c) = \frac 2 5 \pi a^2 \left[1 - \frac c {\sqrt{c^2 + 1}} \right]. $$