The average value of the function $f (x, Y, z) =x^2+y^2+z^2$ within the region $\omega:x^2+y^2+z^2\leqslant x+y+z$.

Solution: The average value can be calculated by dividing the integral of the function within the region by the volume of the region.

This area shape is not easy to see directly, slightly deformation can be described as the region $\omega$

\[

(X-\frac{1}{2}) ^2+ (y-\frac{1}{2}) ^2+ (z-\frac{1}{2}) ^2\leqslant\frac{3}{4}.

\]

The area $\omega$ is a sphere, and the volume of $\frac{\sqrt{3}\pi}{2}$ is easy to understand.

To calculate the integral of the function, replace the integral variable as follows:

\begin{align*}

x= & \frac{1}{2}+r\sin\varphi\cos\theta, \ \

Y= & \frac{1}{2}+r\sin\varphi\sin\theta, \ \

Z= & \frac{1}{2}+r\cos\varphi,

\end{align*}

Calculates the

\[

J=\frac{\partial (x, Y, z)}{\partial (R,\varphi,\theta)}=r^2\sin\varphi.

\]

The calculation function integral is as follows:

\begin{align*}

I= & \iiint_\omega (x^2+y^2+z^2) {\rm d}v \ \

= & \int_{0}^{2\pi}{\rm d}\theta\int_{0}^{\pi}{\rm d}\varphi\int_{0}^{\frac{\sqrt{3}}{2}}

\big[(\frac{1}{2}+r\sin\varphi\cos\theta) ^2+ (\frac{1}{2}+r\sin\varphi\sin\theta) ^2

+ (\frac{1}{2}+r\cos\varphi) ^2\big]| j| {\rm d}r{\rm d}\varphi{\rm d}\theta\\

= & \int_{0}^{2\pi}{\rm d}\theta\int_{0}^{\pi}{\rm d}\varphi\int_{0}^{\frac{\sqrt{3}}{2}}

\big[\frac{3}{4}+r\sin\varphi\cos\theta+r\sin\varphi\sin\theta+r\cos\varphi+r^2\big]

R^2\SIN\VARPHI{\RM d}r{\rm d}\varphi{\rm d}\theta\\

= & \frac{\sqrt{3}\pi}{5}.

\end{align*}

So the average value is

\[

\FRAC{\FRAC{\SQRT{3}\PI}{5}}{\FRAC{\SQRT{3}\PI}{2}}=\FRAC{2}{5}.

\]

The topic of finding the mean of ternary function in space area