divergence free vector fields on non-simply connected domains We know that divergence free vector fields are themselves curls of vector fields on simply connected domains. I want to construct a counter example in the case the domain is not simply connected. So consider an infinite line of charge along the $z$-axis of constant charge density. Then its electric field is given (unless I have made a mistake!) by $$\vec{E} = k\langle\frac{x}{x^2+y^2}, \frac{y}{x^2+ y^2},0\rangle.$$ By Gauss' theorem this should be divergence free (also follows from a simple computation). Can it be shown that this is not the curl of some vector field? 
I guess in general if we can find a surface without boundary on which the flux is not zero then by Stokes' theorem the electric field cannot be the curl of a vector potential. But the problem is that there cannot find a closed surface without boundary around the $z$-axis, and so maybe one has to take the unit sphere and remove a small cylinder and use some approximation argument. Any ideas?

Your example is the curl of a vector field defined on the complement of the $z$ axis, namely
$$ \langle \dfrac{yz}{x^2 + y^2}, \dfrac{xz}{x^2 + y^2}, 0 \rangle $$
The condition on the domain $D$ for a divergence free field to be a curl
is not that it is simply connected, but rather that 
every closed surface in $D$ is the boundary of a domain contained in $D$.
Consider e.g. the electric field of a point charge at the origin.  That is divergence free and defined on the complement of the origin (which is a simply connected domain), but it is not a curl, as you see by taking the flux through a sphere centred at the origin.
