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.
 A: Now consider the winding number of the curve about the two poles. This will do the job.
A: $$ 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})} $$
A: There's also a simpler way of doing this. Observe that the function is holomorphic except at $z=a$ and $z=\dfrac{1}{a}$, then note your contour is the unit circle, as some other answers have discussed (if you're lost on this point, observe as a quick and easy method that generally contours with angles are circles or parts of circles, that we have $0$ to $2 \pi$ here, so clearly talking about one circle and you have $e^{it}$ which has modulus one so a unit radius). Now as $0 < a < 1$, $\frac{1}{a}$ is outside the circle so only need to look at $a$. You could use a Laurent series as previous answer has it, but this is quite messy (often one can avoid using Laurent's theorem). Now, there is a theorem (consult your textbook for a proof) that says a point is a pole of order m if $f(z)$ can be written as $\dfrac{\phi(z)}{{(z-z_0)}^m}$ where $\phi(z)$ is analytic and nonzero at $z_0$. Moreoever, the residue at $z_0$ is $\phi(z_0)$ if $m=1$ and $\dfrac{\phi^{m-1}(z_0)}{(m-1)!}$ if $m \geq 2$. So, here we note for $z=a$ we can set $\phi(z)=\dfrac{1}{z-1/a}$ and then we have that $\phi(a)=\dfrac{1}{a-1/a}$ and we note that $m=1$ in this case, so this is the residue and we are done. 
A: Are you familiar with the rule of residue theory that says that if $f(z)$ is analytic and has a simple zero at $z_0$, then Res$[\frac{1}{f(z)}, z_0]= \frac{1}{f'(z_0)}$? Try using this to evaluate the residue. I hope you get the same answer as mentioned in your post.
