# What if $\operatorname{div}f=0$?

Say, we have a function $f\in C^1(\mathbb R^2, \mathbb R^2)$ such that $\operatorname{div}f=0$. According to the divergence theorem the flux through the boundary surface of any solid region equals zero.

So for $f(x,y)=(y^2,x^2)$ the flux through the boundary surface on the picture (sorry for its thickness, please treat it as a line) is zero.

The result (if I interpret the theorem correctly) seems to be quite surprising.

It looks like can also get non-zero flux by zero divergence. For example, $$g(x,y)=(-\frac{x}{x^2+y^2},-\frac{y}{x^2+y^2})$$ (see the next picture) has $\operatorname{div}g=0$ yet the flux is clearly negative.

The function $g$ isn't continuous at $(0,0)$ and therefore not $C^1$.

My first question is: are there any other cases where divergence is zero yet the flux isn't?

The reasons I'm asking is the exercise I came across:

Compute the surface integral $$\int_{U}F \cdot dS$$ where $F(x,y)=(y^3, z^3, x^3)$ and $U$ is the unit sphere.

I didn't expect the exercise to be doable mentally (by simply noting that $\operatorname{div}F=0$ and concluding the integral is zero) yet $F$ is clearly $C^1$ so the divergence theorem seems to be applicable. My second question is: am I overlooking something in the exercise?

• what is your definition of ${\rm div}\ f$? – janmarqz Jan 9 '14 at 19:03
• @janmarqz: $\operatorname{div}f= \frac{\partial f_1}{\partial x_1}+...+\frac{\partial f_n}{\partial x_n}$ – Leo Jan 9 '14 at 19:07
• For a surface integral, one integrates over a surface. The unit circle is not a surface. Something is off. – RghtHndSd Jan 9 '14 at 19:16
• this other definition [en.wikipedia.org/wiki/Divergence#Definition_of_divergence] doesn't it help? – janmarqz Jan 9 '14 at 19:18
• @rghthndsd: I cut one dimension thinking it wasn't relevant. Take a took at the edited problem statement. – Leo Jan 9 '14 at 19:21

$$g(x,y) = \left( -\frac{x}{x^2+y^2}, -\frac{y}{x^2+y^2} \right)$$
is not even defined at the origin, which is why Green's theorem doesn't apply to it. In the final problem though, the vector field $F$ is well-defined (and $C^1$) everywhere on $\mathbb{R}^3$, so you can apply the divergence theorem, and conclude that the flux is $0$.