Integrate $\int_{|z|=r} x \, dz$ I'm looking to integrate
$$\int_{|z|=r} x \, dz$$
My question is:
Given that $z(t)=re^{it}$ is a parametrization for $|z|=r$, then what's $x$? It's not a variable, because $z$ is, but does it refer to the $\cos(t)$ part of $e^{it}$ or is it a constant in the integration?
 A: Contour Integration
On $|z|=r$, $\bar{z}=\frac{r^2}z$ and $x=\frac12(z+\bar{z})$. Therefore,
$$
\begin{align}
\int_{|z|=r}x\,\mathrm{d}z
&=\int_{|z|=r}\frac12\left(z+\frac{r^2}z\right)\mathrm{d}z\\
&=0+r^2\pi i\\[6pt]
&=r^2\pi i
\end{align}
$$

Real Integration
$$
\begin{align}
\int_{|z|=r}x\,\mathrm{d}z
&=\int_{|z|=r}x\,\mathrm{d}(x+iy)\\
&=\int_{|z|=r}x\,\mathrm{d}x+i\int_{|z|=r}x\,\mathrm{d}y\\[4pt]
&=0+i\,\text{Area}(|z|\le r)\\[9pt]
&=\pi r^2 i
\end{align}
$$
A: If this is given as it is, I think this is just
$$\left.x\int_{|z|=r}dz= x\int_0^{2\pi}rie^{it}dt=rxe^{it}\right|_0^{2\pi}=0$$
If there's given some definite relation between $\;x\;$ and $\;z\;$ then something else can happen say $\;x=\text{Re}\,z\;$ , and then
$$\int_{|z|=r}xdz=\int_0^{2\pi} r\cos t \,r\,i\,e^{it} dt=r^2i\int_0^{2\pi}\cos te^{it}\,dr=r^2i\int_0^{2\pi}\left(\cos^2t+i\cos t\sin t\right)dt=$$
$$=r^2i\left(\frac{t+\cos t\sin t}2-\frac14\cos2t\right)_0^{2\pi}=r^2i\pi$$
but I'm a little not sure about this last part.
A: \begin{align}
& \int_0^{2\pi} (r\cos\theta) \,d(r\cos\theta + ir\sin\theta) = r^2\int_0^{2\pi} (\cos\theta) \Big( -\sin\theta + i\cos\theta \Big) \, d\theta \\[10pt]
= {} & r^2 \int_0^{2\pi} (-\cos\theta\sin\theta)\,d\theta + i r^2 \int_0^{2\pi} \cos^2\theta\,d\theta = r^2(0 + i\pi).
\end{align}
