Troubles working with Residue Theorem I am trying to compute the integral on the positively oriented circle $$\int_{\partial D(1,2)} \frac{z dz}{(z+2)(z^2 -2z + 2)}.$$
So I apply the Residue Theorem. First I compute the singularities which are $$-2,(1-i),(1+i).$$
Now the formula is $$\int_{\gamma} f(z) dz = 2 \pi i\sum_{a \in S} n(\gamma ; a) Res_a f$$
So for this I need to compute the winding numbers of the singularities first. Now here is the first question I have:
The circle is defined with center $r = 1$ and radius $R = 2$. I think I should not cross any singularity. Does that mean I can ignore the first singularity at $-2$?
Now for all $$(1-i),(1+i)$$ I have $$n(\gamma ;a)=1$$ therefore the formula is:
 $$\int_{\gamma} f(z) dz = 2 \pi i\sum_{a \in S} Res_a$$
Now I have to calculate:
$$Res_a f:=\frac{1}{2 \pi i} \int_{\gamma} \frac{z dz}{(z+2)(z^2 -2z + 2)}$$
and $$\gamma (t) = e^{i \phi}$$ with $\phi$ from $[0;2\pi]$
But here I'm really confused how to integrate. I know how to calculate a line integral but here I don't have any function $f(x)$ but $z$. Do I have to substitute $z$ with $\gamma$ so that I have $$\int_0^{2 \pi} f(\gamma (t))\dot{\gamma} dt$$
Thank you very much for your help.
 A: I definetely think that this is the notation for a disk centered at 1 of radius 2: $D(1, 2)$. So, your curve is definetely a circle (the boundary of the disk).
I also think that your reasoning was flawless up to the point where you want to take an integral to calculate the residue.
Since the point of this exercise is to avoid integrating, I don't think that you should use this approach to find the residue. Since your poles are of the first degree, you just need to find the following limit: $$\lim_{z\to a} (z-a) f(z)$$
Normally, you don't even need the limit, you just simplify the expression removing the singularity and then put in your value of $a$ and calculate the residue. For example, for the point $1-i$, the residue would be $$(z - 1 + i)f(z)\bigg|_{1-i} = \frac{z}{(z + 2)(z - 1 - i)}\bigg|_{1-i} = \frac{1-i}{(3 - i)(-2i)}$$
(watch for arithmetic errors).
So, you calculate the residues like this in both points, you summ them up and multiply by $2\pi i$, and you're done.
A: Hy!
The $\partial D(1,2)$  means were integrating on the boundary of the disk of center 1 and radius 2. That being said it means the function $\frac{z}{z+2}$ is holomorphic in the interior of the disk so we apply the formula for simple poles two times.
$$Res(f, c) = \frac{1}{(n-1)!}lim_{z\to c} \frac{d^{n-1}}{dz^{n-1}}(z-c)^nf(z)$$
It's worth mentioning though what it may happen when the disk is centered in $0$. Then the point $-2$ is actually on the boundary of the disk and then the formula doesn't apply.
We first need to realize that such simple poles would not pose a problem if we would encircle them in their vecinity let's say with a semicircle of radius $\epsilon$. Then the residue theorem transforms into a new theorem:

Theorem: Let D$\in\mathbb{C}$ be a simple connected domain, $C$ a simple curve, smooth and closed inside the domain D and  $\Delta$ the domain(open) bounded by C. We consider a function f which has in $\Delta$ a finite number of singular isolated points(poles but even essential singularities), written $a_1, a_2, ..., a_n$ and a finite number of first order poles that are on the curve C. Then
  $$ f:D \setminus  \{a_1,a_2,...,a_n,b_1,b_2,...,b_m\} \to \mathbb{C}$$
  is  a holomorphic function. Then
  $$ \int_{C}f(z)dz = 2 \pi i\sum_{\substack{i=1\\a_i \in S}}^n Res(f, a_i) + \pi i\sum_{\substack{j=1\\b_j \in \partial S}}^m Res(f, b_j)$$

The source of the second term has it's roots in Cauchy Principal Value theorem. It seems though a nice proof can't be easily found. Though if you're good at french or at least look only at the math this may be useful:
http://fr.wikipedia.org/wiki/Th%C3%A9or%C3%A8me_des_r%C3%A9sidus
