<s>[INST] Calculate $\int_{x^2+y^2+z^2
Calculate the integral: $$\int_{x^2+y^2+z^2<x+y+z} (x^2+y^2+z^2)dxdydz$$
Of course calculating the integral $\int_{a}^{b}\int_{c}^{d}\int_{e}^{f} (x^2+y^2+z^2)dxdydz$ would be very easy. However I have a problem because I must find $a,b,c,d,e,f$. I tried to use substitution: $$\begin{cases} x=r \cos \alpha \cos \beta \\ y=r \cos \beta \sin \alpha \\ z=r \sin \beta \end{cases} \text{   or   } \begin{cases} x=r \cos \alpha \\ y=r  \sin \alpha \\ z=z \end{cases}$$
But every of them proved to be ineffective.
Is there anyone who have some tips what I can do to find limits of integrity?
 [/INST] Note that \begin{align*} x^2 + y^2 + z^2 < x+y+z \,\,\,\,\, &\Longleftrightarrow \,\,\,\,\, (x^2-x) + (y^2-y) + (z^2-z) < 0\\
&\Longleftrightarrow \,\,\,\,\, (x-1/2)^2 + (y-1/2)^2 + (z-1/2)^2 < 3/4.
\end{align*} Thus you are integrating over a sphere centered not at the origin, but at $(1/2,1/2,1/2)$ which should inform your substitution.
</s>