I need to calculate the integral of $\int_{-1}^{+1}|z| dz$ in two ways:
- integrating along a line
- integrating along the arc of unit radius circle
However, I have some trouble coming to the right answer and am somewhat confused because these two methods give two different answers.
Here's my attempt:
For one, I tried to apply the definition $|z|=\sqrt{x^2+y^2}$ and interpreting it on $xy$ plane with such $y=0$ and $|z|=|x|$, but the answer I am getting is $0$, which is apparently incorrect.
For two, I define $|z|=re^{i\theta}$ and $dz=ie^{i\theta}d\theta$, but I am confused about the upper and lower bounds of integration, since apparently from $0$ to $2\pi$ is incorrect.
I'd very much appreciate if someone could explain how to continue solving this problem based on the ideas that I've mentioned, and explain why these answers differ.