\[\mathbf{r} \cdot \mathbf{n}\]
over a surface we can use the divergence theorem.\[\begin{equation} \begin{aligned} \int \int_S \mathbf{r} \cdot \mathbf{n} dS &= \int \int \int_V \mathbf{\nabla} \cdot \mathbf{r} dV \\ &= \int \int \int_V (\frac{\partial}{\partial x} \mathbf{i} + \frac{\partial}{\partial y} \mathbf{j} + \frac{\partial}{\partial z} \mathbf{k} ) \cdot (x \mathbf{i} + y \mathbf{j} + z \mathbf{k} ) dV \\ &= \int \int \int_V 3 dV = 3V \end{aligned} \end{equation}\]
Example: If
\[V\]
is a cube of side 3,\[\int \int_S \mathbf{r} \cdot \mathbf{n} dS = 3 \times 3^3 =81\]
Example: If
\[V\]
is a sphere of radius 2,\[\int \int_S \mathbf{r} \cdot \mathbf{n} dS = 3 \times \frac{4}{3} \pi \times 2^3 = 32 \pi\]