Help Debugging a Bogus Proof We want to prove the standard fact that a smooth function $u :R^2 \to R$ with $ \nabla u = 0$ everywhere in some connected open set $ \Omega $ is constant in that set.
I'm comfortable with the usual proof, but I also thought it could be proved the following way:
$$ \nabla u = 0 \space\iff\space du = 0$$
$u$ also satisfies Laplace's equation($\nabla \cdot\nabla u = 0$), and hence has the mean value property.
Let $x_0$ be any point of $ \Omega $(distinct from the origin!). For any disk $\Delta$ about $x_0$ of radius $r$ sufficiently small, $$u(x_o) = \frac {1} {2\pi} \int_{\partial\Delta}u\space d\theta $$
But, by Stokes' theorem $$ \int_{\partial\Delta}u \space d \theta = \iint_{\Delta}du\wedge d \theta = 0 \tag1$$ (as $d^2 = 0$, and $du = 0$).
This is not the correct conclusion, as $u$ could be equal to any constant.
I think $(1)$ must be the problematic line, but I can't see why, as $$ d(u \space d\theta) = du\wedge d\theta - u \wedge d^2 \theta $$.

The problem is the differential form $d\theta$. In Cartesian coordinates this so-called "form" is
$$
d\theta = \frac{xdy-ydx}{x^2+y^2}
$$
This is not a well-defined form as it is not well-defined at $x=y=0$. Another way of seeing this is if $d\theta$ was a well-defined form then $\oint d\theta = 0$ but it is not! This is because $\theta$ is not a continuous function.
By means of distributions (generalized functions) one can make sense of the form $d\theta$ but then $d\theta$ is not an exact form, i.e. $d^2\theta \neq 0$! In fact it is not even closed! By a direct calculation it is easy to check that $d^2\theta=0$ away from $r=0$ but
$$
\int_\Delta d^2\theta = \int_{\partial \Delta} d\theta = 2\pi\Longrightarrow d^2\theta = 2\pi \delta(x-x_0)\delta(y-y_0)dxdy
$$
where $\delta(x)$ is the Dirac delta function. Then you will see that you need to modify your usage of Stokes theorem to
$$
u(x_0, y_0)=\frac{1}{2\pi}\int_\Delta ud^2\theta= \int_\Delta u(x,y)\delta(x-x_0)\delta(y-y_0)dx dy
$$
which is a trivial equation. So the correct version of your argument leads to a trivial statement $u(x_0, y_0)=u(x_0, y_0)$ at the end and does not prove anything.
