Compute the integral Compute the integral: 
$$\frac{1}{2\pi i}\int_{|z| = 1}\frac{(z-b)^m}{(z-a)^n}dz$$
where $|a| < 1 < |b|$; $m, n \in \mathbb{Z}$
My approach is using Cauchy integral formula, we have 
$$\frac{1}{2\pi i}\int_{|z| = 1}\frac{(z-b)^m}{(z-a)^n}dz$$
$$= \frac{2\pi i}{2\pi i}(n-1)!(a-b)^m = (n-1)!(a-b)^m$$
Is this approach correct? If not, can you show me where was I wrong? Thank you!
 A: Use Cauchy's integral formula properly.
$$\frac{1}{2\pi i}\int_{|z| = 1}\frac{(z-b)^m}{(z-a)^n}dz$$
$$= \frac{2\pi i}{2\pi i}\frac{1}{(n-1)!}\lim_{z\to a}\frac{d^{n-1}}{dz^{n-1}}(z-b)^m =?$$
A: Notice, $$\frac{1}{2\pi i}\int_{|z| = 1}\frac{(z-b)^m}{(z-a)^n}dz=\frac{1}{2\pi i}\oint \frac{(z-b)^m}{(z-a)^n}dz$$
It is clear that $z=a$ & $z=b$ are two points out of which $z=a$ is lying inside the unit circle $|z|=1$ (given $|a|<1<|b|$) 
hence $z=a$ is a pole of $n$th order & $f(z)=(z-b)^m$ Now, using cauchy integral formula, as follows 
$$\frac{1}{2\pi i}\oint \frac{(z-b)^m}{(z-a)^n}dz=\frac{1}{2\pi i}\left(\frac{2\pi i}{(n-1)!}\right)\lim_{z\to a}\left(\frac{d^{n-1}}{dx^{n-1}}(z-b)^m\right)$$ $$ =\frac{1}{2\pi i}\left(\frac{2\pi i}{(n-1)!}\right)\lim_{z\to a}\left(\frac{d^{n-1}}{dx^{n-1}}(z-b)^m\right)$$ $$ =\frac{1}{(n-1)!}\lim_{z\to a}\left(\frac{d^{n-1}}{dx^{n-1}}(z-b)^m\right)$$
Let $n<m$
$$ =\frac{1}{(n-1)!}\lim_{z\to a}\left(m(m-1)(m-2)\ldots (m-n+1)(z-b)^{m-n}\right)$$
$$ =\frac{1}{(n-1)!}(m(m-1)(m-2)\ldots (m-n+1))(a-b)^{m-n}$$ $$ =\frac{m(m-1)(m-2)\ldots (m-n+1)}{(n-1)!}(a-b)^{m-n}$$
Let $n=m$
$$ =\frac{1}{(n-1)!}\lim_{z\to a}\left(m(m-1)(m-2)\ldots 3.2.1\right)$$
$$ =\frac{m!}{(n-1)!}=\frac{n!}{(n-1)!}=n$$

Edit Let $n=m+1$ $$=\frac{1}{(n-1)!}\lim_{z\to a}\left(m!\right)=\frac{m!}{(n-1)!}=\frac{(n-1)!}{(n-1)!}=1$$
  Let $n>(m+1)$ $$=\frac{1}{(n-1)!}\lim_{z\to a}\left(0\right)=0$$

A: Substituting $z\mapsto z+a$ and using the Binomial Theorem to get the coefficient of $z^{-1}$, we get
$$
\begin{align}
\frac1{2\pi i}\oint_{|z|=1}\frac{(z-b)^m}{(z-a)^n}\,\mathrm{d}z
&=\frac1{2\pi i}\oint_{|z+a|=1}\frac{(z+a-b)^m}{z^n}\,\mathrm{d}z\\[6pt]
&=\binom{m}{n-1}(a-b)^{m-n+1}
\end{align}
$$
Note that if $n\lt1$, $\binom{m}{n-1}=0$ and if $m\lt0$, $\binom{m}{n-1}=(-1)^{n-1}\binom{n-m-2}{n-1}$.
