Hello everyone I was looking at a solution of a triple integral and was wondering why this step holds. If someone could take the time to clarify this, your awesome! Thanks in advance.
Question: $$\iiint_D (x^2+y^2+z^2) \,dV$$ with D: $$(x-3)^2+(y-2)^2+(z-7)^2 \leq 9$$ Is the same as $$(\bar{x}+\bar{y}+\bar{z}) V$$ with $\bar{x}=3$, $\bar{y}=2$, $\bar{z}=7$ and V the volume of the sphere.
For any sphere of the form $(x-\bar{x})^2+(y-\bar{y})^2+(z-\bar{z})^2 \leq r^2$ we can rewrite the integral and show that
$$x^2+y^2+z^2 = (x-\bar{x})^2+(y-\bar{y})^2+(z-\bar{z})^2+2(\bar{x}x+\bar{y}y+\bar{z}z)-(\bar{x}^2+\bar{y}^2+\bar{z}^2)$$
$$= \Bigr[(x-\bar{x})^2+(y-\bar{y})^2+(z-\bar{z})^2\Bigr]+2\Bigr[\bar{x}(x-\bar{x})+\bar{y}(y-\bar{y})+\bar{z}(z-\bar{z})\Bigr]+\Bigr[\bar{x}^2+\bar{y}^2+\bar{z}^2\Bigr]$$
The three terms in brackets are easy to analyze
$$\iiint\limits_V\Bigr[(x-\bar{x})^2+(y-\bar{y})^2+(z-\bar{z})^2\Bigr]dV = \frac{3}{5}r^2V $$
$$\iiint\limits_V2\Bigr[\bar{x}(x-\bar{x})+\bar{y}(y-\bar{y})+\bar{z}(z-\bar{z})\Bigr]dV = 0$$
$$\iiint\limits_V\Bigr[\bar{x}^2+\bar{y}^2+\bar{z}^2\Bigr]dV=(\bar{x}^2+\bar{y}^2+\bar{z}^2)V$$
by spherical coordinates, odd symmetry, and volume times a constant, respectively. This means the final answer is
$$\iiint\limits_V\Bigr[x^2+y^2+z^2\Bigr]dV = \left(\frac{3}{5}r^2+\bar{x}^2+\bar{y}^2+\bar{z}^2\right)V$$
Edited to match OP's notation.