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 form $d\theta$ is not defined at $0$ (and, indeed, can't be continued across $0$), so Stokes' theorem doesn't apply. For example, Stokes' theorem would give
\begin{align*}
\int_{\partial \Delta} d\theta = \int_{\Delta} d(d\theta) = 0,\;\;\;\;\;(!)
\end{align*}
although the first integral is clearly $2\pi$. The best you can do in this situation removing a small disk around $x_0$ in $\Delta$; Stokes' theorem will then apply, although the result isn't particularly enlightening. For a deeper explanation about why this problem is unavoidable and actually more of a feature than a bug, see (for example) de Rham cohomology.
