Find $\int_{\gamma}\frac{dz}z$ 
If $\gamma$ is a path from $-i$ to $i$, whose image is contained in $\mathbb C\setminus\mathbb R^-$, find $\int_{\gamma}\frac{dz}z$ 

Does the integral converge ?, because the path $-i+2it, 0\le t\le1$ is also in $\mathbb C\setminus\mathbb R^-$ and for $t=1/2$ it is $0$
or can I use the fact that $f(z):=\frac1z$ is meromorphic with simple pole at $0$ and define 
$\alpha_{\rho}(t):=0+\rho e^{it}, t\in[0,\pi]$  and then $\displaystyle\int_{\alpha_{\rho}}f(z)dz=\text{res}_0(f)\cdot \pi i$
with $\text{res}_0(f)=a_{-1}$ where $a_{-1}$ is the Laurent coefficient of $f$
Is the result $1$ ?
 A: $\gamma$ is a path from $i$ to $-i$, not necessarily a straight line which passes through $0$. 
Since the image of $\gamma$ does not touch $\mathbb R^-$, it means that $\gamma$ cannot "turn around" $0$, so you can't really use the residue theorem because there are no residue in the inside of $\gamma$ (well $\gamma$ is not even a closed curve. But anyhow you can't close it such that $0$ is inside)
So any curve between those two points will result in the same integral.
How to do that? Well since we are on $\mathbb C - \mathbb R^-$, we have that $\log z$ is a holomorphic function (it's not multivalued anymore) and it's derivative is $\frac 1z$, we can use the usual formula;
The result depends only on the endpoints, and we get 
$$\int_\gamma \frac 1z dz = \log(i) - \log(-i) =i \frac \pi2 - (-i\frac \pi2) = i\pi$$
A: Inasmuch as @Ant has already provided an efficient approach, it might be instructive to see a more "brute force" approach.
To that end we parameterize $z$ on $\gamma$ and let $z=x(t)+iy(t)$, $0\le t\le 1$, with $x(0)=x(1)=0$, $y(0)=-1$, and $y(1)=1$.
Thus, $dz=x'(t)dt+iy'(t)dt$ and the integral of interest becomes
$$\begin{align}
\int_{\gamma}\frac{dz}{z}&=\int_{0}^1\frac{x(t)x'(t)+y(t)y'(t)}{x^2(t)+y^2(t)}dt+i\int_{0}^1\frac{x(t)y'(t)-y(t)x'(t)}{x(t)^2+y(t)^2}dt\\\\
&=\left. \frac12 \log(x^2(t)+y^2(t))\right|_{t=0}^{t=1}+i\,\left.\arctan\left(\frac{y(t)}{x(t)}\right)\right|_{t=0}^{t=1}\\\\
&=(0-0)+i(\pi/2-(-\pi/2))\\\\
&=i\pi
\end{align}$$
as expected!


NOTE:  For a more general development, see This Answer.

