When does a line integral equal an ordinary integral? I was working through a proof, and it changed a line integral into a normal integral. It was analogous to the below, where $\cos(\theta)\,dl=dr$ and $C$ is a path from $b$ to $a$:
$$\int_C F(r)\cos(\theta)\,dl=\int^{r_a}_{r_b} F(r)\,dr$$
Why is this valid, i.e. why does the second integral not depend on the path taken? It would seem to me that it should, if say we kept increasing and decreasing $r$ along the same path, this might have an effect on the integral. So why in this situation can we go from a line integral to a normal integral?

If ${\bf F}$ is the gradient of some scalar $\phi$ (i.e., if ${\bf F}$ is conservative) then
$$\int_C {\bf F}\cdot d{\bf r} 
= \int_a^b \nabla\phi \cdot {\bf r}'(t) dt
= \int_a^b \frac{d \phi}{dt} dt
= \phi(b)-\phi(a),$$
since $d\phi({\bf r}(t))/dt = \nabla\phi \cdot {\bf r}'(t)$. 
The line integral depends only on the value of $\phi$ at the endpoints. 
This is what is meant by the statement that a line integral is independent of path.
