What is the average temperature of the surface of this planet? 
A spherical, $3$-dimensional planet has center at $(0, 0, 0)$ and radius
  $20$. At any point of the surface of this planet, the temperature is
  $T(x, y, z) = (x + y)^2 + (y - z)^2$ degrees. What is the average
  temperature of the surface of this planet? 

We will define this $3$-dimensional sphere by S=$\{(x,y,z)  \in \mathbb{R}: x^2 + y^2 + z^2 = 20^{2}\}$
As we can see, $T(S)$ has a uncountable number of points. So I think I have to use the integral structure to solve this problem. For well understanding, it is possible to look at Darboux Theorem for integrability. Moreover, I have the feeling we will needed of the Spherical coordinates. Is anyone is able to give me a hint to continue this question. 
 A: There is a very basic solution that takes advantages of some of the symmetries you can impose on the problem.
$T\left(x,y,z\right)=x^2+2y^2+z^2+2xy-2yz$
Now we can simplify this to
$T\left(x,y,z\right)=400+y^2+2xy-2yz$
Since $x^2+y^2+z^2=400$
But we still have a lot of left over terms to get rid of and we can do this by taking advantage of symmetry.
By switching the order of our inputs we can get:
$T\left(x,y,z\right)=400+y^2+2xy-2yz$
$T\left(z,x,y\right)=400+x^2+2zx-2xy$
$T\left(y,z,x\right)=400+z^2+2yz-2zx$
So we have
$T\left(x,y,z\right)+T\left(z,x,y\right)+T\left(y,z,x\right)=1600$
For any $x,y,z$
This is helpful because if $(x,y,z)$ is on the sphere then we know both $(z,x,y)$ and $(y,z,x)$ are also on the sphere.
Thus, for all points on our sphere such that $x\neq y\neq z$ we can group these points into groups of $3$ such that the sum of their temperatures is $1600$. This means the average temperature on the surface of the planet is $1600/3$ degrees.
Note that we do not have to take into account the cases where $x=z$ or $y=z$ or $x=y$ since they make up such a minuscule part of the actual sphere.
A: Start by expressing $T$ in polar co-ordinates ..
$T(r,\theta,\phi) =r^2 \left [ (\sin\theta(\sin\phi + \cos \phi))^2 + (\sin\theta\cos \phi - \cos \theta)^2 \right ]$
$ =r^2 \left [ \sin^2\theta(\sin^2\phi + 2 \sin\phi\cos\phi+ \cos ^2\phi) + (\sin^2\theta\cos^2 \phi - 2\sin^2\theta\cos \phi  \cos\theta+\cos ^2\theta) \right ]$
$ =r^2 \left [ \sin^2\theta(1 + 2 \sin\phi\cos\phi) + (\sin^2\theta(\cos^2 \phi - 2\cos \phi  \cos\theta)+\cos ^2\theta) \right ]$
$ =r^2 \left [ 1+\sin^2\theta( 2 \sin\phi\cos\phi + \cos^2 \phi - 2\cos \phi  \cos\theta)\right ]$
Average Temperature = $\frac{I}{4 \pi r^2}$ where ...
$$I= r^2\int_0^{2 \pi} \int_0^{ \pi}  \left [ 1+\sin^2\theta( 2 \sin\phi\cos\phi + \cos^2 \phi - 2\cos \phi  \cos\theta)\right ]  d\theta d\phi $$
I suggest you split this into four double integrals and evaluate each one separately
