# Evaluating Complex Line Integrals

Calculate $\int_{\gamma}\frac{\Re(z)}{z-\frac{1}{2}}dz$ and $\int_{\gamma}\frac{\Im(z)}{z-\frac{1}{2}}dz$ when $\gamma$: $|z|=1$ is positively oriented.

This is what I have tried to do, starting with the first line integral.

Since $\frac{\Re(z)}{z-\frac{1}{2}}$ is not analytical/holomorphic at any point in the plane - it does not satisfy the Cauchy-Riemann equations - we cannot use Cauchy's integral formulae immediately. However, $|z|=1$ implies that the conjugate to $z$, $z*=\frac{1}{z}$, because $1=|z|^{2}=zz*$. Thus, we may write: \begin{align*} \int_{\gamma}\frac{\Re(z)}{z-\frac{1}{2}}dz &=\frac{1}{2}\int_{\gamma}\frac{z+\frac{1}{z}}{z-\frac{1}{2}}dz \\ &=\frac{1}{2}\int_{\gamma}\frac{z^{2}+1}{z(z-\frac{1}{2})}dz \\ &=\frac{1}{2}\int_{\gamma}(1-\frac{\frac{z}{2}+1}{z(z-\frac{1}{2})}dz \\ &=\frac{1}{2}\int_{\gamma}dz-\frac{1}{2}\int_{\gamma}\frac{\frac{z}{2}+1}{z(z-\frac{1}{2})}dz \\ &=-\frac{1}{2}\int_{\gamma}\frac{-2}{z}+\frac{\frac{5z}{2}}{z-\frac{1}{2}}dz \\ &= \int_{\gamma}\frac{1}{z}dz-\frac{5}{4}\int_{\gamma}\frac{z}{z-\frac{1}{2}}dz \\ &=2\pi{i}(1-\frac{5}{8}) \\ &=\frac{3\pi{i}}{4} \end{align*}

Note that I rewrote the right hand side two times, using partial fractions. Similarly,I have attempted to the second line integral, however, this time a only used partial fractions once.

\begin{align*} \int_{\gamma}\frac{\Im(z)}{z-\frac{1}{2}}dz &= \frac{1}{2i}\int_{\gamma}\frac{z-\frac{1}{z}}{z-\frac{1}{2}}dz \\ &=\frac{1}{2i}\int_{\gamma}\frac{z^{2}-1}{z(z-\frac{1}{2})}dz \\ &=\frac{1}{2i}\int_{\gamma}(1-\frac{2}{z}+\frac{3}{z-\frac{1}{2}})dz \\ &=\frac{1}{2i}\int_{\gamma}dz-\frac{1}{2i}\int_{\gamma}\frac{-2}{z}dz-\frac{1}{2i}\int_{\gamma}\frac{3}{z-\frac{1}{2}}dz \\ &= \frac{1}{i}\int_{\gamma}\frac{1}{z}dz-\frac{3}{4i}\int_{\gamma}\frac{1}{z-\frac{1}{2}}dz \\ &=2\pi{i}(\frac{1}{i}-\frac{3}{4i}) \\ &=\frac{5\pi}{4}\end{align*}

As I have not studied complex analysis, I am unsure whether any of these two answers are correct. I would very much appreciate if someone more experienced person could help me check, most likely correct, my calculations.

-

You have some problem on partial fraction $\displaystyle \frac{z^2 + 1}{z(z-1/2)} \neq 1 - \frac{\frac z 2 + 1}{z(z-1/2)}$.
This should be $\displaystyle \frac{z^2 + 1}{z(z-1/2)} = 1 + \frac{\frac z 2 + 1}{z(z-1/2)} = 1+\frac{5/2}{z - 1/2} - \frac 2 z$.
And this should give you $\displaystyle \frac{2 \pi i}{2} ( \frac 52 - 2) = \pi/2$
On the other, $\displaystyle \frac{z^2 - 1}{z(z-1/2)} = 1 + \frac 2 z - \frac{3/2}{z - 1/2}$ while you have written $\displaystyle \frac{z^2 - 1}{z(z-1/2)} = (1-\frac{2}{z}+\frac{3}{z-\frac{1}{2}})dz$
Also that on here $$=\frac{1}{2i}\int_{\gamma}(1-\frac{2}{z}+\frac{3}{z-\frac{1}{2}})dz \\ =\frac{1}{2i}\int_{\gamma}dz-\underbrace{\frac{1}{2i}\int_{\gamma}\frac{-2}{z}dz-\frac{1}{2i}\int_{\gamma}\frac{3}{z-\frac{1}{2}}dz}_{\text{why - here ??}} \\$$ This is wrong step.