Calculate $ \int_\gamma \frac{1}{z-i}dz $ Calculate the following integral
$$
\int_\gamma \frac{1}{z-i}dz
$$
with $\gamma$ circle of radius 2 centered at the origin. Any suggestions please? Thank you very much.
 A: The question is pretty basic so I assume you're beginning with this stuff and you probably want to go with basic line integrals, parametrization and stuff. 
Parametrize thus...but with a twist 
$$z-i=2e^{it}\;,\;\;0\le t\le 2\pi\implies dz=2ie^{it}\,dt\implies$$
$$\oint\limits_C\frac{dz}{z-i}=\int\limits_0^{2\pi}\frac{2ie^{it}dt}{2e^{it}}=\int\limits_0^{2\pi}i\,dt=2\pi i$$
A: Hint: Cauchy's Integral Formula.
Alternatively note that $z\mapsto \dfrac 1{z-i}$ is holomorphic in the simply connected sets $\color{grey}{A:=}\mathbb C\setminus \{z\in \mathbb C\colon \Re(z-i)\leq 0 \land \Im(z-i)=0\}$ and $\color{grey}{B:=}\mathbb C\setminus \{z\in \mathbb C\colon \Re(z-i)\ge 0 \land \Im(z-i)=0\}$, therefore it has an anderivative on each of this sets.
Consider the following functions:
$$\log_A\colon A\to \mathbb C, z\mapsto \log\left(\left|z-i\right|\right)+i\arg_A\left(z-i \right)$$
$$\log_B\colon B\to \mathbb C, z\mapsto \log\left(\left|z-i\right|\right)+i\arg_B\left(z-i \right)$$
where $\arg_A, \arg_B$ are functions such that $\text{im}(\arg_A)\subseteq]-\pi, \pi[$ and $\text{im}(\arg_B)\subseteq]0,2 \pi[$.
Since $\gamma=\gamma _A\lor \gamma _B$, where $$\gamma _A\colon \left[-\dfrac \pi 2, \dfrac \pi 2\right]\to \mathbb C, \theta \mapsto 2e^{i\theta},$$
$$\gamma _B\colon \left[\dfrac \pi 2, \dfrac {3\pi}2\right]\to \mathbb C, \theta \mapsto 2e^{i\theta},$$
since $\log _A$ and $\log _B$ are anderivatives of $z\mapsto \dfrac 1{z-i}$ in $A$ and $B$, respectively, it follows that 
$$\begin{align} \int _{\gamma _A}\dfrac 1{z-i}\mathrm dz&=\log _A(z)\bigg|^{z
=\gamma _A\left( \pi/ 2\right)}_{z=\gamma _A\left( -\pi/ 2\right)}\\
&=\log\left(|2i-i|\right)+i\dfrac \pi 2-\log (|-2i-i|)+i\dfrac \pi 2\\
&=-\log(3)+i\pi\end{align}$$
and
$$\begin{align} \int _{\gamma _B}\dfrac 1{z-i}\mathrm dz&=\log _B(z)\bigg|^{z
=\gamma _B\left( 3\pi/ 2\right)}_{z=\gamma _B\left( \pi/ 2\right)}\\
&=\log\left(|-2i-i|\right)+i\dfrac {3\pi} 2-\log (|2i-i|)-i\dfrac \pi 2\\
&=\log(3)+i\pi\end{align}.$$
Hence $$\int _{\gamma }\dfrac 1{z-i}\mathrm dz=\int _{\gamma _A}\dfrac 1{z-i}\mathrm dz+\int _{\gamma _B}\dfrac 1{z-i}\mathrm dz=2\pi i.$$
A: By the Residue theorem we have
$$
\int_\gamma \frac{1}{z-i}dz=2i\pi Res(f,i)=2i\pi
$$
