TITLE: Gradient of a Harmonic Function
QUESTION [7 upvotes]: I was asked the following vector calculus problem:

Let $D$ be the unit ball and let $S$ be the unit sphere in $\mathbb{R}^3$.  Suppose that $F:\mathbb{R}^3\rightarrow \mathbb{R}^3$ is a $C^1$ vector field on some open neighborhood of $D$ which satisfies:
$(i) \nabla\times F=0$
$(ii) \nabla\cdot F=0$
$(iii)$ On $S$, $F$ is orthogonal to the radial vector.
Prove that $F=0$ on all of $D$.

Conditions $(i)$ and $(ii)$ imply that $F=\nabla g$ for some $g:\mathbb{R}^3\rightarrow \mathbb{R}$ where $g$ must be harmonic as well.
I know one solution (see end), however my initial instinct was to try to use the max/min property of harmonic functions, and I couldn't get it to work.  Since the gradient is always orthogonal to the sphere, there must be a point on the sphere where it is $0$.  (Hairy ball)  If that was a local max or min in $\mathbb{R}^3$ we would be done, by taking a small neighborhood around it.  If it is a saddle point this doesn't work.  (We know that it must be a local max/min on $S$ since it is harmonic)
My question is:  Is there any way to modify this approach, and solve the problem?
Thanks!
Other Solution: Here is one solution that first uses the fact that the radial vector is orthogonal, and then applies Gauss's Divergence theorem to the function $gF$. ($\nabla g=F$) That is $$0=\iint_S (gF\cdot n)dS=\iiint_D \nabla\cdot (gF)dV=\iiint_D \|F\|^2dV,$$ and since the integrand on the right hand side is non-negative, continuous and integrates to give zero, it must be zero.

REPLY [2 votes]: Eric, I am simply rephrasing your second proof to give you a more PDE style approach to this problem, let $\vec{F} = \nabla u$, the problem you gave was equivalent to solve the following boundary value problem:
Find $u\in C^2(D)$ such that
$$
\left\{\begin{eqnarray}
-\Delta u &=& 0 \text{ in } D \\
\nabla u \cdot n &=& 0 \text{ on } \partial D
\end{eqnarray}
\right.$$
Now multiply both sides of the equation by a test function in some proper space(as large as possible), doing integration by parts to use the boundary condtion, and you will get the variational formulation of this problem:
Find $u\in V = W^{1,2}(D)$ such that
$$
\int_D \nabla u\cdot \nabla v = 0 \quad \forall v\in V
$$
Notice there is no Dirichlet type boundary condition enforced for the test function $v$, which makes this problem yield non-unique solutions; In order to make this problem well-posed, instead in the space $V$, consider a new space $V_0 = \{v\in V | \int_D v dx = 0\} = V/R$ this variational problem is equivalent to the following functional minimization problem:
If $u$ solves the original pde, then $u$ minimizes
$$
J(u) = \min_{v\in V_0}\int_D |\nabla v|^2\,dx
$$
Now assume $u$ is the solution, then
$$
J(u) = \int_D |\nabla u|^2\,dx \leq \sup_{v\in V_0} \int_D \nabla u\cdot \nabla v = 0
$$
which proves for the solution $u\in V_0$: $\nabla u = 0$(other solutions are different with some specific $u$ from a constant by the definition of that quotient space, hence the gradient does not change)