Close integral problem I was looking at a solution of a electromagnetism problem but confused in a line integral . I understood how they did till they get zero. 
 


where $\alpha $ is constant. r is the distance between space point and space point charge. $e_r$ is the unit vector that is directed from the q to the space point.  
 A: Here is how I would understand general integration of this form: 
Define $d(x,y) = \sqrt{x^2 + y^2}$. 
Suppose we have a vector field that points radially outward from the origin with an intensity that depends only on the distance from the origin: 
$$\vec{E}(x,y) = f(d(x,y)) \vec{e}_{x,y} = f(d(x,y)) \frac{1}{d(x,y)} (x,y)$$
where $e_{x,y} = \frac{1}{d(x,y)}(x,y)$ is a unit vector in the direction of $(x,y)$, and $f(d)$ is the function that determines intensity as a function of the distance $d$. 
Consider a path $L$ defined by a trajectory $(x(t),y(t))$ defined for $t \in [0,1]$. Then: 
\begin{align}
\int_L \vec{E}\cdot d\vec{l} &= \int_0^1 \vec{E}(x(t),y(t)) \cdot (x'(t),y'(t))dt \\
&= \int_0^1 f(d(x(t),y(t))\frac{1}{d(x(t),y(t))}(x(t),y(t))\cdot(x'(t),y'(t))dt \\
&= \int_0^1 f(\underbrace{d(x(t),y(t)}_{r})\underbrace{\frac{1}{d(x(t),y(t))} (x(t)x'(t) + y(t)y'(t))dt}_{dr} \\
&= \int_0^1 f(r(t)) r'(t)dt \\
&\overset{(a)}{=} \int_{r(0)}^{r(1)} f(r)dr 
\end{align}
where we define:
\begin{align}
r(t) = d(x(t),y(t))  =\sqrt{x(t)^2 + y(t)^2}  \implies r'(t)
= \frac{1}{d(x(t),y(t))}(x(t)x'(t) + y(t)y'(t)) 
\end{align}
and the change of variables in (a) is justified when $f(r)$ is continuous over the interval where the trajectory is defined, and $r(t)$ and $r'(t)$ are continuous. In particular, the trajectory should avoid passing through the origin. 

So if the path is a loop, we have $r(0)=r(1)$ and the integral is $\int_{r(0)}^{r(0)}f(r)dr=0$.  In your case, it looks like $f(r) = \frac{q}{4\pi\epsilon_0}\frac{1}{r^2}(1-\sqrt{\alpha r})$, which is continuous over the interval $r>0$. 
