Let $f(z)=Re(z)$ and $\gamma=\{|z|=1\}$ be the unit circle oriented counterclockwise. Compute $\int_\gamma \frac{f(z)}{z-1/2}~dz$
From the lecture we know that $f(z)=\frac{z+z^{-1}}{2}$ on $\gamma$.
My idea was to apply Cauchy's integral formula to compute $\int_\gamma \frac{\frac{z^2+1}{2z}}{z-1/2}~dz$.
But I'm a but confused how to define my $\Omega$ where $f$ is analytic. I don't think that I can apply Cauchy's integral formula directly on this integral but I don't see why. Could someone help me?
Consider this picture. I marked the two poles at $0$ and $\frac12$. The outer circle is the contour $\gamma$. Consider the two closed contours given by the "upper half circle" and the "lower half circle". They do not enclose a pole and so the integral along these contours evaluate to $0$ according to Cauchy's theorem. But also, the integrals along those two contours are the same as the integral along $\gamma$ (counterclockwise) plus the integrals along the two smaller circles (clockwise), since the integrals along the straight lines cancel (one integral going to the left, one to the right). So if I call the smaller circles $\gamma_0$ and $\gamma_{\frac12}$, we have $$\oint_{\gamma} g(z)\mathrm dz-\oint_{\gamma_0}g(z)\mathrm dz-\oint_{\gamma_{\frac12}}g(z)\mathrm dz=0.$$ The negative signs are to account for the orientation of the contours, and $g$ is just the function you're integrating. Now this means that $$\oint_{\gamma} g(z)\mathrm dz=\oint_{\gamma_0}g(z)\mathrm dz+\oint_{\gamma_{\frac12}}g(z)\mathrm dz.$$ And the two integrals on the right you can calculate using Cauchy's integral formula, since they only enclose a single pole.