Finding the coefficient of the Laurent Series using the integral formula This question has been asked multiple times, but I can't seem to find one that does it using the formula. My book skips the steps and says that you can find the coefficients with the formula, but I am having a hard time finding them.
$$f(z) = \frac{1}{(z-1)(z-2)}$$ is the function.
I know I can get the coefficients with the geometric series, but I want to find them using
$$a_k = \frac{1}{2\pi i}\int_{|z - z_{0}| = r} \frac{f(z)}{(z-z_0)^{k+1}}$$
For this problem, $z_0 = 0$ and we are finding this over the annulus $1 < |z| < 2$. Plugging into the formula, and after doing partial fraction decomposition,
$$a_k = \frac{1}{2\pi i} \int_{|z| = r} [\frac{1}{z^{k+1}(z - 2)} - \frac{1}{z^{k + 1}(z - 1)}] dz$$
Rewriting,
$$a_k = \frac{1}{2\pi i} \int_{|z| = r} [\frac{z^{-k-1}}{(z - 2)} - \frac{z^{-k-1}}{(z - 1)}] dz$$
Now, I left $r$ arbitrary as this is the start of my confusion. My book said this holds for any fixed $1 < r < 2$. (The 1 and 2 are for this specific example. Generally it says $\rho < r < \sigma$). This would lead me to believe I can't choose $r = 2$ based on this logic. However, without choosing $r = 2$, the first expression would always evaluate to $0$ by Cauchy's integral formula. I hope someone can clear this up, but for now let's proceed with $r = 2$.
In this case, the result would
$$a_k = \frac{1}{2^{k + 1}} - 1$$ by Cauchy's integral formula (if I used it right). However, I am supposed to get two answers. $-1$ for $k < 0$ and $\frac{-1}{2^{k + 1}}$ for $k \geq 1$
I'm already very confused at this point because if $1 < r < 2$ strictly, I'm not sure what other fixed $r$ I could pick. While my next thoughts are going against my textbook, I decided to think of the first integral as the "positive k's" and the second as the "negative k's". This logic would result in the $-1$ for negatives, but I am off by a negative sign for the positive $k's$ as the result should be $\frac{-1}{2^{k + 1}}$ rather than $\frac{1}{2^{k + 1}}$
Again going against my book, I did some googling and found that some sources evauate the integral over an $R_1$ and $R_2$ (smaller and bigger). Using $R_1 = 1$ and $R_2 = 2$, I would once again get $-1$ for the negative $k's$ as the first integral would go to $0$. However, the second integral does not go away as $z = 1$ is still a singularity in $|z| = 2$. So I would again end up with $\frac{1}{2^{k+1}} - 1$.
After quite some time of having no idea where I'm going wrong, I decided to come here. Can anyone please clear this up? It would be SUPER nice to see this done as an example. It was an example problem in my book, but I'm shocked I can't find any textbooks or sources that do the example with the formula.
EDIT: I have figured out the value of $-1$ for the negative $k$'s with the help in the comments. However, I am still very confused on how the positive $k$'s do not have a result of $\frac{1}{2^{k + 1}}$. I am trying everything I can, but I'm starting to be convinced this formula is just wrong. The result isn't matching up... please help
EDIT 2: Still having trouble. Can anyone please lend a hand?
 A: So you want the Laurent series for
$$
f(z) = \dfrac{1}{(z-1)(z-2)}
$$
using
$$
a_k = \dfrac{1}{2\pi i}\oint_{|z - z_{0}| = r} \dfrac{f(z)}{(z-z_0)^{k+1}}\,dz
$$
around $z=0$ over the annulus $1 <|z| < 2$. Perfect, let's do it! First, use partial fractions
$$
\dfrac{1}{(z-1)(z-2)} = \dfrac{-1}{z-1} + \dfrac{1}{z-2},
$$
then plug that into the formula
$$
a_k = \dfrac{1}{2\pi i}\oint_\gamma \dfrac{1}{(z-0)^{k+1}} \bigg(\dfrac{-1}{z-1} + \dfrac{1}{z-2} \bigg)\,dz \\ = \dfrac{1}{2\pi i}\oint_\gamma \dfrac{1}{(z-0)^{k+1}} \cdot \dfrac{-1}{(z-1)}\,dz + \dfrac{1}{2\pi i}\oint_\gamma \dfrac{1}{(z-0)^{k+1}} \cdot \dfrac{1}{(z-2)}\,dz
$$
with $\gamma$ a closed curve inside that annulus. Let's pay attention to the second term
$$
\dfrac{1}{2\pi i}\oint_\gamma \dfrac{1}{(z-0)^{k+1}} \dfrac{1}{(z-2)}\,dz,
$$
which can be computed using this formula
$$
\dfrac{1}{2\pi i}\oint_\gamma \dfrac{1}{(z-0)^{k+1}} \cdot \dfrac{1}{(z-2)}\,dz = \dfrac{1}{k!} \dfrac{d^k}{dz^k} \Big(\dfrac{1}{z-2} \Big) \bigg |_{z=0}.
$$
Well, we need an expression for the $k$th derivative, which is
$$
\dfrac{d^k}{dz^k} \Big(\dfrac{1}{z-2} \Big) = \dfrac{k! \, (-1)^k}{(z-2)^{k+1}},
$$
with this, the integral is
$$
\dfrac{1}{2\pi i}\oint_\gamma \dfrac{1}{(z-0)^{k+1}} \cdot \dfrac{1}{(z-2)}\,dz = \dfrac{1}{k!} \dfrac{k! \, (-1)^k}{(0-2)^{k+1}} = \dfrac{-1}{2^{k+1}}.
$$
What we did is valid when $k \ge 0$. What happens when $k \le -1$? With $k = -1$
$$
\dfrac{1}{2\pi i}\oint_\gamma \dfrac{1}{(z-2)}\,dz = 0
$$
because there are no poles inside $\gamma$ for $1/(z-2)$. For
$$
k < -1 \implies -k > 1 \implies -k-1 >0,
$$
the integral is
$$
\dfrac{1}{2\pi i}\oint_\gamma \dfrac{1}{(z-0)^{k+1}} \dfrac{1}{(z-2)}\,dz = \dfrac{1}{2\pi i}\oint_\gamma \dfrac{z^{-k-1}}{(z-2)}\,dz = 0
$$
because there are no poles inside $\gamma$ for $z^{-k-1}/(z-2)$. Let's focus on the first term
$$
\dfrac{1}{2\pi i}\oint_\gamma \dfrac{1}{(z-0)^{k+1}} \cdot \dfrac{-1}{(z-1)}\,dz.
$$
As you can see, there are two poles, at $z=0$ and $z=1$, which means we will get two values. For $z=0$
$$
\dfrac{1}{2\pi i}\oint_\gamma \dfrac{1}{(z-0)^{k+1}} \cdot \dfrac{-1}{(z-1)}\,dz = \dfrac{1}{k!} \dfrac{d^k}{dz^k} \Big(\dfrac{-1}{z-1} \Big) \bigg |_{z=0}.
$$
An expression for the $k$th derivative is
$$
\dfrac{d^k}{dz^k} \Big(\dfrac{-1}{z-1} \Big) = \dfrac{k! \, (-1)^{k+1}}{(z-1)^{k+1}},
$$
so the integral is
$$
\dfrac{1}{2\pi i}\oint_\gamma \dfrac{1}{(z-0)^{k+1}} \cdot \dfrac{-1}{(z-1)}\,dz = \dfrac{1}{k!} \dfrac{k! \, (-1)^{k+1}}{(0-1)^{k+1}} = 1.
$$
For $z=1$
$$
\dfrac{1}{2\pi i}\oint_\gamma \dfrac{1}{(z-1)} \cdot \dfrac{-1}{(z-0)^{k+1}} \,dz = \dfrac{-1}{(1-0)^{k+1}} = -1.
$$
What we did is valid for $k \ge 0$, so $a_k = 1 - 1 = 0$. What happens when $k \le -1$? When $k= -1$
$$
\dfrac{1}{2\pi i}\oint_\gamma \dfrac{-1}{(z-1)}\,dz = -1.
$$
For
$$
k < -1 \implies -k > 1 \implies -k-1 >0,
$$
the integral is
$$
\dfrac{1}{2\pi i}\oint_\gamma \dfrac{1}{(z-0)^{k+1}} \dfrac{-1}{(z-1)}\,dz = \dfrac{1}{2\pi i}\oint_\gamma \dfrac{-z^{-k-1}}{(z-1)}\,dz = -(1)^{-k-1} = -1.
$$
With all this calculations we get the coefficients
$$
\begin{align}
\dfrac{-1}{2^{k+1}} \quad &\text{for} \quad k\ge 0,\\
-1 \quad &\text{for} \quad k\le -1.
\end{align}
$$
