I have $$\int_{-1}^1 |z|dz$$
I need to calculate the integral where the integration contour is the upper semi-circle with unit radius. I calculated the integral in $(-1; 1)$ section; the answer is 1, but I'm not sure how to calculate for the upper semi-circle.
Note: I think I may have been considering a different contour, since the original poster asked what they could do after finding $\int\limits_{-1}^1 |z|dz$. I am thinking of a contour like this:
where $R=1$. If OP only requires the upper half, then we can disregard the $1$ in the final sum.
If you're taking $\gamma$ to be this contour, note that $\gamma$ is formed by two curves: $\gamma_1$ and $\gamma_2$ where $\gamma_1$ is the interval $[-1,1]$ and $\gamma_2$ is the upper arc of the semicircle. Thus we have that $$ \int\limits_\gamma |z| dz = \int\limits_{\gamma_1} |z|dz + \int\limits_{\gamma_2}|z|dz$$ You already found that $$ \int\limits_{\gamma_1} |z|dz = \int\limits_{-1}^1 |z| dz = 1$$ We have to find $\int\limits_{\gamma_2}|z|dz$. Note that for all $z$ on $\gamma_2$, $|z|=1$ because $z$ lies on the arc of the unit circle. So \begin{align*}\int\limits_{\gamma_2}|z|dz = \int\limits_{\gamma_2}1dz = \int\limits_0^\pi ie^{i\theta}d\theta = -2 \end{align*} So $$ \int\limits_\gamma |z| dz = -1$$