<s>[INST] Calculating this residue (residue theorem) Given $$\int_{\gamma}\frac{1}{(z-a)(z-\frac{1}{a})}dz,$$ and $0<a<1$, where $\gamma(t)=e^{it}$ and $0\le t \le 2\pi$
I am trying to find the residue of$$f(z)=\frac{1}{(z-a)(z-\frac{1}{a})}$$
The answer says $\operatorname{res}(f,\mathbb C)=\frac{1}{(a-\frac{1}{a})}$?
Any help will be appreciated, thanks.
 [/INST] $$ f(z)=\frac{1}{(z-a)(z-\frac{1}{a})}=\frac{\frac{1}{a-\frac{1}{a}}}{z-a}+\frac{\frac{-1}{a-\frac{1}{a}}}{z-\frac{1}{a}} $$ 
$$ \gamma \text{ is unit circle} \hspace{20mm} \text{Poles of Function} \begin{cases} z_1=a    &\text{placed inside of unit circle}  \\
z_2=\frac{1}{a}  &\text{placed outside of unit circle}  \end{cases} $$
$$ |a|<1 \rightarrow |\frac{1}{a}|>1 \hspace{10mm} $$
$$ \text{Newton's generalised binomial theorem} $$ 
$$ (a+b)^n =a^n+\frac{n}{1!}a^{n-1}b+\frac{n(n-1)}{2!}a^{n-2}b^2+...+b^n $$
$$ \frac{\frac{1}{a-\frac{1}{a}}}{z-a}= \frac{1}{a-\frac{1}{a}}(z-a)^{-1}=\frac{1}{a-\frac{1}{a}}(z^{-1}+z^{-2}a+z^{-3}a^2+...)=\frac{1}{a-\frac{1}{a}}\sum_{n-1}^{\infty}z^{-n}a^{n-1}$$
$$ \text{so residue is coefficient of term }z^{-1} \rightarrow\frac{1}{a-\frac{1}{a}} $$
$$ I=\int_{\gamma}\frac{1}{(z-a)(z-\frac{1}{a})}dz=2 \pi i .\operatorname{res}(f,\mathbb C)=\frac{2 \pi i}{(a-\frac{1}{a})} $$
</s>