Basic question on the Aharonov-Bohm effect I have a very basic question on the Aharonov-Bohm effect.
Why is the curve integral  $\oint_\Gamma {A}\cdot d{r}$ non-zero ?
$\Gamma$ is the "difference" of both paths $P_1$ and $P_2$. 
If the magnetic field is limited to the interior of the solenoid $\operatorname{curl} {A}=0$ along the integral path $\Gamma$, so I can conclude that I can write ${A}=\nabla f$. A closed curve integral of a gradient function is zero. 
I guess it is related with a possible singularity of $A$ in the very center of the solenoid. 
Nevertheless if I travel around a point-like source of a gravitational field and compute the  integral $\oint_\Gamma {F}\cdot d{r}$ where $F=-\nabla V(r)$ the closed curve integral over an conservative force field is certainly zero, whereas $V(r)$ even has a singularity and $F$ consequently too.
I would be very grateful for an explanation.
 A: From $$\operatorname{curl} A = 0 \tag{1} $$ in a region $U$, you can in general not conclude that $$A = \nabla f \tag{2}$$ for some function $f$ defined on all of $U$. Indeed this is related to the singularity, which removes a line through the origin. The degree to which (1) fails to imply (2) depends on the topology of $U$, more specifically it's de Rham cohomology. (1) implies (2) iff the de Rham cohomology is trivial. For $U = \mathbb{R} \times (\mathbb{R^2} \setminus \{ 0 \} )$, it turns out that the cohomology is not trivial, and hence your integral need not vanish.
To show that (1) does not imply (2) for 3-space with a line removed, we can assume that the line is the $z$-axis and, consider $$A = \begin{cases} \nabla \operatorname{arctan2} (y,x) & (x,y) \neq (0,-1) \\ (0, -1, 0 ) & (x,y) = (0,-1) \end{cases}$$
where also $(x,y) \neq (0,0)$. $A$ is smooth, and $\operatorname{curl} A = 0$, but you cannot find a function $f$, continuous away from the $z$-axis, such that $\nabla f = A$ everywhere.
It less trivial (or rather, one first needs to construct some sledgehammers, and then it's a 2-line proof) to show that for 3-space with a point (1) does indeed imply (2).

Update: If you want to understand why a point can be removed but not a line, one can think of it as needing to make a hole that is big enough. Suppose we have two curves $\gamma_1$ and $\gamma_2$ and $\int_{\gamma_i} A$, where $\operatorname{curl} A = 0$. If $\gamma_1$ can be deformed to $\gamma_2$ one can apply Stokes's theorem to argue that the integrals are equal. Suppose that the space is such that any curve can be deformed into any other curve. Then a standard prescription exists to find $f$: pick any point $x_0$ and let $$f(x) = \int_\gamma A $$ where $\gamma$ is any curve connecting $x_0$ and $x$. By the assumption the integral doesn't depend on the particular $\gamma$ chosen so $f$ is unambiguously defined. To make the argument fail you have to make a "hole" big enough that curves can't be deformed into each other. Removing a point isn't enough in three dimensions, but a line is: make a loop around the line singularity, you can't get it to not encircle the line without dragging it across the singularity. (In 2 dimensions a point is enough, because you can consider the projection of this example onto a plane.)
A: I couldn't resist putting the sledgehammers to work that Robin Ekman alluded to, and I will try to present their general argumentation in a way one can understand without knowing all the details, but I don't intend to presume that this is in any sense a better answer, it is simply one that shows which things one must know to rigorously understand the weird statement that "sometimes there isn't, but sometimes there is a function so that $\nabla f = A$".
We consider vector fields $A^i$, by the Euclidean metric, to be equivalent to their dual 1-forms as per $A_i = A^i$. On 1-forms on 3D manifolds $\mathcal{M}$, we have an exact cochain complex of p-forms (denoted $\Omega^p(\mathcal{M})$) [with $d^p$ being the exterior derivative on p-forms]
$$ \Omega^0(\mathcal{M}) \overset{\mathrm{d^0}}{\rightarrow} \Omega^1(\mathcal{M}) \overset{\mathrm{d^1}}{\rightarrow} \Omega^2(\mathcal{M}) \overset{\mathrm{d^2}}{\rightarrow} \Omega^3(\mathcal{M})$$ 
As is usual for such things, we can take the cohomology of such a cochain complex, defined as $H^p(\mathcal{M}) := \frac{\mathrm{ker}(d^{p})}{\mathrm{im}(d^{p-1})}$. It can be shown that this is, by the Eilenberg-Steenrod axioms, an ordinary cohomology theory, thus the same as every other ordinary cohomology theory of $\mathcal{M}$. (this deRham cohomology has naturally coefficients in $\mathbb{R}$ instead of $\mathbb{Z}$, but that is nothing to worry too much about)
The marvelous things about (co)homology theories is that they are the same for every homotopic topological space, i.e. they are the same for space with can be continously deformed into each other.
Now, $\mathbb{R} \times (\mathbb{R}^2 - \{0\})$ is, since $\mathbb{R}$ can be deformation retracted to a point, homotopy equivalent to $\text{Pt} \times (\mathbb{R}^2 - \{0\}) = \mathbb{R}^2 -\{0\}$, which is in turn homotopy equivalent to the circle $S^1$.
On the contrary, $\mathbb{R}^3 - \{0\}$ is homotopy equivalent to the sphere $S^2$.
Of both these homotopy equvialences you may convince yourself by your intuition, but, as I was writing this, I had to admit that I cannot put this into words that transmit well between me and my readers without a blackboard and some time.
So, accepting Eilenberg-Steenrod, our question of whether we can or cannot lift a 1-form in the kernel of the derivative to be the image of a 0-form has reduced to the question whether the first cohomology of the circle or the sphere vanish.
Now, certainly all n-spheres are compact spaces, and certainly they have now boundary. Since we can describe them with polar coordinates locally, they are also manifolds. Now, for such compact orientable manifolds, there is Poincaré duality, which states that the $p$-th cohomology $H^p(\mathcal{M})$ is isomorphic to the $n-p$-th homology $H_{n-p}(\mathcal{M})$. But the ordinary homology of spheres is well understood! In fact, just by thinking with the Eilenberg-Steenrod axioms, you can show that, since every sphere $S^n$ is essentially made out of two disks $D^n$ glued together (the hemispheres), $H^n(S^n) = \mathbb{Z}$ and $H^0(S^n) = \mathbb{Z}$, but $H^p(S^n) = 0$ if $p \neq n \wedge p \neq 0$. The duality then yields directly that 
$$ H_1(S^1) = \mathbb{Z} \wedge H_1(S^2) = 0 $$
Thus, for the actual 2-sphere $S^2$ , the kernel of the derivative is the image of the derivative, and every vector field on the sphere (and anything that is homotopy equivalent to it) whose curl vanishes is the exterior derivative of some scalar function. But for the circle $S^1$, there are fields which are in the kernel of the derivative but not its image, else the cohomology would be trivial. 
Since the Aharonov-Bohm situation has a line singularity and is homotopic to the circle, the usual argument for "conservative forces" fails. But, for point singularities in 3D, we are homotopic to the sphere, where the argument goes through.
