I thought I was a good math student, but for some reason I am getting tripped up on complex analysis. Can someone please explain what I am doing wrong when I try to solve the following problem?

Problem: Given the function $\displaystyle f(z)=\frac{z-a}{z+a}$, where $\displaystyle a\in\mathbb{C}$, compute $\displaystyle f^{(n)}(0)$ the "smart" way - using the Cauchy Integral Formula.

Attempted Solution:

If a=0, the problem is trivial, so assume a not zero. Cauchy's integral formula gives us that if $\displaystyle C$ is any "nice" curve enclosing 0 in the complex plane, then

$\displaystyle f^{(n)}(0)=\cfrac{n!}{2\pi i}\int_C{\cfrac{f(z)}{z^{n+1}}dz}$

Let's take $\displaystyle C$ to be a counter-clockwise circle about 0, of small enough radius that the singularity $\displaystyle z=-a$ is excluded from the interior (so that Cauchy's integral formula applies. Now, we want to compute the integral

$\displaystyle I=\int_C{\cfrac{z-a}{(z+a)z^{n+1}}dz}$

Immediately using the parametrization $\displaystyle z=re^{i\theta}$ doesn't appear to be fruitful here, but the substitution $\displaystyle z=1/u$ yields:

$\displaystyle I=-\int_{C'}{\cfrac{1/u-a}{1/u+a}u^{n-1}du}$

$\displaystyle =-\int_{C'}{\cfrac{1-ua}{1+ua}u^{n-1}du$

where $\displaystyle C'$ is now a circle of radius $\displaystyle r'>1/|a|$. Hence, this curve contains a singularity, $\displaystyle u=-1/a$. Where do I go from here? Any better ideas? (My book says to use Cauchy integral formula, so I'd appreciate solutions which somehow use that result.)