I have the following problem so solve
Examine a ball $B \in \mathbb{R}^3$ with radius $R = 3$ and center at the origin and examine the vector field
$$\vec{F}(x,y,z) = \begin{pmatrix} x \\ y \\ z \end{pmatrix}$$
Then determine the total flux of this vector field out of the ball B by using the divergence theorem with spherical coordinates:
The first part of the answer is
$$\vec{F}(x,y,z) = \begin{pmatrix} x \\ y \\ z \end{pmatrix} = \sqrt{x^2 + y^2 + z^2}\vec{e}_r = r\:\vec{e}_r \tag{1}\label{eq1}$$
and thus $F_r = r$ and $F_\phi = F_\theta = 0$
$$\text{div }\vec{F} = \frac{1}{r^2} \frac{\partial(r^2)F_r}{\partial r} = \frac{\partial(r^2\cdot r)}{\partial r}= \frac{1}{r^2}3r^2 = 3$$
Thus the total flux out of this ball is 3 times the voluem of the ball i.e.
$$\text{flux } = 3\frac{4}{3}\pi R^3 = \pi 108$$
This could be computed by a triple integral over the ball
\begin{align}\text{flux } &= \iiint_{B}\text{div}\:\vec{F}\:dV = \iiint_{B}3\:dV \tag{2}\label{eq2}\\ &= \int_{r=0}^{R} \int_{\theta=0}^{\pi} \int_{\phi=0}^{2\pi} 3r^2\:\sin\theta\:d\phi\:d\theta\:dr \\ &= \int_{r=0}^{R} \int_{\theta=0}^{\pi} 2\:\pi\:3r^2\:\sin\theta\:d\theta\:dr \\ &= \int_{r=0}^{R} 2\cdot 2\:\pi\:3r^2\:\:dr = 4\pi R^3 = \pi 108 \end{align}
My personal questions / what I don't understand:
concerning (1): We use the definition of the magnitude of a vector to state $\vec{F}(x,y,z) = \begin{pmatrix} x \\ y \\ z \end{pmatrix} = \sqrt{x^2 + y^2 + z^2}\vec{e}_r$ correct?
concerning (1) again: which theorem / geometrical assumption do we have to invoke to state the following equality: $\sqrt{x^2 + y^2 + z^2}\vec{e}_r = r\vec{e}_r$ ?
concerning (2): what is the geometrical explanation why we integrate $\theta$ from $0$ to $\pi$ and not to $2\pi$?
(1) Recall that divergence theorem $$\int\int\int_B \ {\rm div}\ F =\int\int_{\partial B}\ F\cdot n\ dS$$ where $n$ is out unit normal to a surface $\partial B$
(2) Recall polar coordinate : $f : [0,1]\times [0,\pi]\times [0,2\pi ] \rightarrow \{ (x,y,z)||(x,y,z)|\leq 1\} $ by $$ f(r,s,t) =(r\sin\ s\cos\ t,r\sin\ s\sin\ t,r\cos\ s) $$
Note that $f$ is surjective.