Is any divergence-free curl-free vector field necessarily constant?

Solution 1:

How about Gradient of a harmonic function?

Solution 2:

For example a constant field is harmonic, but doesn't satisfy the normal boundary conditions at infinity. In any topological space, there is one harmonic field per winding number satisfying given boundary conditions (Hodge decomposition theorem).