I have an exam tomorrow, and we were given like an "example test" without answers, and one question is to solve this Cauchy integral:
$$ \oint_c = \frac {2z+1} {(z+1)^2(z-3)} $$
with circle $ c: |z-2|=5 $
the function has a double pole in $ -1 $ and a single pole in $ 3 $, both of the poles being inside of the circle.
Residue $ f(3) $: $$ \lim_{z \rightarrow 3}(\frac{2z+1}{(z+1)^2}) = \frac 7 {16} $$
Residue $ f(-1) $: $$ \frac {1} {1!} \lim_{z \rightarrow -1}(\frac{2z+1}{z-3})' = \lim_{z \rightarrow -1}(\frac{2(z-3)-(2z+1)}{(z-3)^2}) = \frac {2(-4) - (-1)} {(-4)^2} = \frac {-7}{16} $$
that makes the final result be: $$ 2 \pi i (\frac {7}{16} + \frac {-7}{16}) = 0 $$
Am I correct? For some reason, I find it odd, that the answer would be a 0 on an exam, but I can't check it anywhere, and I don't seem to see a mistake in my math.
It's correct. Here is a generalisation which explains why this is not a coincidence.
Theorem. Let $p(z)$ and $q(z)$ be polynomials with ${\rm degree}(q)\ge {\rm degree}(p)+2$. Let $C$ be a circle with centre $0$ which has all the zeros of $q(z)$ inside it. Then $$\int_C \frac{p(z)}{q(z)}\,dz=0\ .$$
Sketch of proof. Let $C$ be such a circle. Since $C$ includes all the singularities of $p(z)/q(z)$, increasing the radius will not change the value of the integral: hence, $$\int_C \frac{p(z)}{q(z)}\,dz =\lim_{r\to\infty}\int_{|z|=r} \frac{p(z)}{q(z)}\,dz\ .$$ But estimating the right-hand side gives $$\left|\,\int_{|z|=r} \frac{p(z)}{q(z)}\,dz\,\right| \le (2\pi r)\frac{c_1r^{{\rm deg}\,p}}{c_2r^{{\rm deg}\,q}}\to0\ \ \hbox{as $r\to\infty$}\ .$$
Comment. It should now be clear that $C$ doesn't need to have centre $0$, in fact, doesn't even need to be a circle, just any simple closed curve which has all the zeros of $q(z)$ inside it.