Criteria for Conservative field I am proving a result of vector analysis here it is.

A vector field $F$ is continuous in a Domain $D$ is conservative $\iff$ the line integral of tangential component of $F$ along every regular curve in $D$ depends only on the end points of the curve. Moreover the line integral is simply the difference in potential of the end points

The definition I am using for Conservative field is :-

A vector field $F$ is said to be conservative if there exist a scalar field $\phi$ defined in the domain $D$ such that $F=$$\nabla$$\phi$

I know we have to use concepts of path connected and simply connected but I don't know where to start exactly .
Hints or solution is really appreciated.
 A: The implication $\implies$ is trivial because of the definition of line integrals, chain rule and the usual single variable fundamental theorem of calculus. Explicitly, if $F=\nabla \phi$ for some $C^1$ function $\phi:D\to \Bbb{R}$, then for any (piecewise) $C^1$ path $\gamma:[a,b]\to D$, we have
\begin{align}
\int_{\gamma}F\cdot dl &= \int_{\gamma}\nabla \phi \cdot dl \tag{by assumption}\\
&:= \int_a^b (\nabla\phi)(\gamma(t))\cdot \gamma'(t)\, dt\tag{by definition}\\
&= \int_{a}^b(\phi\circ \gamma)'(t)\, dt\tag{chain rule}\\
&= \phi(\gamma(b)) - \phi(\gamma(a)),\tag{FTC}
\end{align}
which as you can see depends only on the potential function $\phi$ and the endpoints of the path $\gamma$.
For the converse $\impliedby$, we suppose $D$ is a connected open set, and fix a point $a=(a_1,\dots, a_n)\in D$. We define the function $\phi:D\to \Bbb{R}$ as follows: take any other point $x\in D$. Since $D$ is a connected open set, it is in fact path connected, and given any two points we can even take find a $C^{\infty}$ path joining the two points. So, let's fix a piecewise $C^1$ path $\gamma_{a,x}$ starting at $a$ and ending at $x$ (i.e $\gamma_{a,x}:[0,1]\to D$ is smooth and $\gamma_{a,x}(0)=a$ and $\gamma_{a,x}(1)=x$). Now, we define $\phi(x):=\int_{\gamma_{a,x}}F\cdot dl$. In words, the value of $\phi$ at $x$ is obtained by integrating the continuous $F$ along a particular path $\gamma_{a,x}$.
Now, by our assumption on $F$, the value $\phi(x)$ DOES NOT depend on the path $\gamma$, since it only cares about the endpoints of the path (in our case $a$ and $x$); so if we had taken a different path $\sigma_{a,x}$ then $\int_{\gamma_{a,x}}F\cdot dl=\int_{\sigma_{a,x}}F\cdot dl$. This means $\phi$ is a well-defined function (each input $x\in D$ has a uniquely determined output $\phi(x)\in\Bbb{R}$). Now, all that remains is showing $\nabla \phi$ exists and equals $F$. Let us write $F=\sum_{i=1}^n F_i e_i$, i.e the components are $F=(F_1,\dots, F_n)$. Take any point $x=(x_1,\dots, x_n)\in D$, and let $h\in \Bbb{R}$ be a small non-zero quantity, small enough so that the point $(x_1,\dots, x_{i-1}, x_i+h, x_{i+1}, \dots, x_n)$ also lies in $D$ (i.e we're looking at the point $x$ and choosing $h\in \Bbb{R}$ so small that $x+he_i\in D$ as well); of course this is possible because $D$ is open.
Let us now examine the difference quotient
\begin{align}
\dfrac{\phi(x+he_i) - \phi(x)}{h}.
\end{align}
How do we calculate this? Well recall definitions. $\phi(x)$ is calculated by first choosing a piecewise $C^1$ curve $\gamma_{a,x}$ from $a$ to $x$, then $\phi(x)=\int_{\gamma_{a,x}}F\cdot dl$. How is $\phi(x+he_i)$ calculated? We have to choose a path joining $a$ to $x+he_i$ and integrate $F$. But now, because we have the freedom to do so, let us simplify our life and choose the very simple path $\gamma_{a,x+he_1} `='\gamma_{a,x}\cup \sigma$; what I mean is we first traverse from $a$ to $x$ along $\gamma_{a,x}$, then we traverse from $x$ to $x+he_i$ using the straight line path $\sigma$ (i.e $\sigma:[0,1]\to D$ defined by $\sigma(t)= x + the_i$, then $\sigma(0)=x$ and $\sigma(1)=x+he_i$ are the correct endpoints) to get
\begin{align}
\dfrac{\phi(x+he_i) - \phi(x)}{h} &=\dfrac{1}{h}\left(\int_{\gamma_{a,x}\cup \sigma}F\cdot dl - \int_{\gamma_{a,x}}F\cdot dl\right)\\
&= \dfrac{1}{h}\int_{\sigma}F\cdot dl =
\dfrac{1}{h}\int_0^1 F(\sigma(t))\cdot \sigma'(t)\, dt
\end{align}
Well, $F(\sigma(t)) = F(x+the_i)$, and $\sigma'(t) = he_i$, so their dot product is $ F_i(x+the_i) h$, i.e we take the $i^{th}$ component of $F$. Continuing,
\begin{align}
\dfrac{\phi(x+he_i) - \phi(x)}{h} &=
\dfrac{1}{h}\int_0^1F_i(x+the_i)h\, dt =\int_0^1F_i(x+the_i)\, dt.
\end{align}
As $h\to 0$, continuity of $F_i$ implies that the right limit is $F_i(x)$ (this is pretty much what the fundamental theorem of calculus (1) says, but if you want I can elaborate more). In other words, this computation shows that $(\partial_i\phi)(x)$ exists and equals $F_i(x)$. Since this is true for all $i\in\{1,\dots, n\}$ and all $x\in D$, this says precisely that $\nabla \phi=F$, hence the proof is complete.
