I want to calculate the following:
$$\int_C \frac{8-z}{z(4-z)}dz$$
$C$ is a circle of radius $7$, centered at the origin,negative oriented.
I want to do this via finding the residues at $z=0,4$.
I thought I was meant to use Cauchy integral formula and sum the values, like this:
$$\int_C \frac{f_1(z)}{z} dz = \frac{8-0}{4-0}=2$$ $$\int_C \frac{f_2}{(4-z)}dz = \frac{8-4}{4}=1$$
Then since it is negatively oriented we get, $-2\pi i \times (2+1)=-6\pi i$
But the answer is $-2\pi i$, what have I done wrong?
When the denominator is $4-z$, you need to change it to $z-4$ first. This gives you a negative sign. Also, the $2\pi i$ should be included in the answer of the integral.
$$\int_C \frac{f_1(z)}{z} dz = -2\pi i \left(\frac{8-0}{4-0}\right)=-4\pi i\\ \int_C \frac{f_2}{(4-z)}dz =-\int_C \frac{f_2}{(z-4)}dz=2\pi i \left( \frac{8-4}{4}\right)=2\pi i$$