<s>[INST] Calculate a triple integral where the integrand contains cubic terms Calculate
$$I = \iiint\limits_Q(x^3 + y^3 + z^3)\,dx\,dy\,dz$$
where $Q: x^2 + y^2 + z^2 - 2ax-2ay-2az + 2a^2 = 0$ is a sphere
If I try using spherical coordinates I don't go anywhere. Any hint about
how to calculate it?
 [/INST] Due to symmetry
$$I = \iiint_Q(x^3 + y^3 + z^3)\,dV
=3 \iiint_Q z^3\,dV$$
Then, recenter the sphere at origin and integrate in spherical coordinates
\begin{align}
I =& \ 3 \iiint_{x^2+y^2+z^2<a^2} (z+a)^3\,dV
 =\ 3 \iiint_{x^2+y^2+z^2<a^2} (3az^2 +a^3)\,dV\\
 =& \ 3a \iiint_{r<a} r^2 \ r^2\sin\phi dr d\theta d\phi + 3a^3 \cdot \frac43\pi a^3=\frac{32}5\pi a^6
\end{align}
</s>