This is NOT a duplicate question.
I need some help computing the integral
$\int_{\mid z\mid =r} xdz$
But I really want to use the fact that
$x=\frac{1}{2}(z + \frac {r^{2}}{{z}})$ when the circle is oriented counter-clockwise in the integral.
Should I just plug that into the integral? I have seen the similar question to this and understand how to use parameters to get that the integral equals $r^{2}i\frac{\pi}{2}$. However, I am interested in using the fact mentioned above, which requires a different method than the solutions already discussed on this site, so it is not a duplicate. How would I go about this?
$|x|=r$ is $x=-r\lor x=r$ and the integral can be translated to
$$\int_{|x|=r}x\,dz=-\int_{z=-r-i\infty}^{-r+i\infty}r\,dz+\int_{z=r-i\infty}^{r+i\infty}r\,dz,$$ assuming "counterclockwise traversal".
I guess that this can be said to equal zero in the Cauchy sense.
Assuming a typo in the problem statement,
$$\int_{|\color{red}z|=r}x\,dz=\int_{t=0}^{2\pi}r\cos(t)\,d(re^{it})=r^2\int_{t=0}^{2\pi}\cos(t)ie^{it}dt=\\r^2\int_{t=0}^{2\pi}(i\cos^2(t)-\cos(t)\sin(t))\,dt=i\pi r^2$$ by the average values of $\cos^2(t)$ and $\cos(t)\sin(t)$. The sign is positive for a counterclockwise traversal.