## Proof of Gauss's Theorem

Theorem
Let
$V$
be a region enclosed by a surface
$S$
.
If
$\mathbf{r} = x \mathbf{i} + y \mathbf{j} + z \mathbf{k}$
, then
$\int \int_S \frac{\mathbf{r} \cdot \mathbf{n}}{r^3} dS = \left\{ \begin{array}{cc} 0 & (0,0,0) \notin S \\ 4 \pi & (0,0,0) \in S \end{array} \right.$

This result is known as Gauss's Theorem.
Proof
To prove the first part, use the Divergence Theorem,
$\int \int_S \mathbf{F} \cdot \mathbf{n} dS = \int \int \int_V \mathbf{\nabla} \cdot \mathbf{F} dV$
where
$S$
the the surface of the volume
$V$
and
$\mathbf{F}$
is twice differentiable.
Let
$\mathbf{F} = \frac{\mathbf{r}}{r^3}$
then
$\int \int_S \frac{\mathbf{r}}{r^3} \cdot \mathbf{n} dS = \in \int \int_V \mathbf{\nabla} \cdot (\frac{\mathbf{r}}{r^3}) dV$

\begin{aligned} \mathbf{\nabla} \cdot (\frac{\mathbf{r}}{r^3}) &= ( \frac{\partial }{\partial x} \mathbf{i} + \frac{\partial }{\partial y} \mathbf{j} + \frac{\partial }{\partial z} \mathbf{k} ) \cdot (\frac{x \mathbf{i}}{(x^2 + y^2 +z^2)^{3/2}} + \frac{y \mathbf{j}}{(x^2 + y^2 +z^2)^{3/2}} + \frac{z \mathbf{k}}{(x^2 + y^2 +z^2)^{3/2}}) \\ &= \frac{\partial}{ \partial x}(\frac{x}{(x^2 + y^2 +z^2)^{3/2}}) + \frac{\partial}{ \partial y}(\frac{y}{(x^2 + y^2 +z^2)^{3/2}})+ \frac{\partial}{ \partial z}(\frac{z}{(x^2 + y^2 +z^2)^{3/2}} ) \\ &= \frac{1}{(x^2 + y^2 +z^2)^{3/2}} - \frac{3x^2}{(x^2 + y^2 +z^2)^{5/2}} + \frac{1}{(x^2 + y^2 +z^2)^{3/2}} - \frac{3y^2}{(x^2 + y^2 +z^2)^{5/2}} + \frac{1}{(x^2 + y^2 +z^2)^{3/2}} - \frac{3z^2}{(x^2 + y^2 +z^2)^{5/2}} \\ &= \frac{3}{r^3} - \frac{3 r^2}{r^5} \\ &= 0 \end{aligned}

To prove the second part let
$V=V_1 +B(O, r_0 ), \: B(O, r_0 ) \in V$
then
and let
$S_0$
be the surface of
$B(O, r_0 )$
.
$\int \int_{S-S_0} \frac{\mathbf{r}}{r^3} \cdot \mathbf{n} dS = 0$

Hence
$\int \int_{S} \frac{\mathbf{r}}{r^3} \cdot \mathbf{n} dS = \int \int_{S_0} \frac{\mathbf{r}}{r^3} \cdot \mathbf{n} dS$

For the surface
$S_0 , \: \mathbf{n} = \frac{\mathbf{r}}{r_0}$

Hence
$\int \int_{S} \frac{\mathbf{r}}{r^3} \cdot \mathbf{n} dS = \int \int_{S_0} \frac{\mathbf{r}}{r_0^3} \cdot \frac{\mathbf{r}}{r_0} dS = \int \int_{S_0} \frac{r_0^2}{r^3_0} dS = \frac{1}{r_0} \times 4 \pi \r_0 = 4 \pi$

For