The question is "find $$\int_C \left\vert z \right\vert dz$$ where $C$ is the left half of a circle from $-i$ to $i$". The expected answer is $2i$. I tried to solve the problem, but my answer is different:
$$ z(t)=ie^{it} $$ (since the radius of the circle is $i$, and $\frac{\pi}{2} \leq t \leq \frac{3\pi}{2}$)
Then: $$\frac{dz}{dt}=-e^{it}$$
and $$ f(z(t)) = \left\vert z(t) \right\vert = \left\vert ie^{it} \right\vert = \sqrt{(ie^{it})^2} $$
$$ -\int \limits_{\frac{\pi}{2}}^{\frac{3\pi}{2}} e^{it}\cdot \sqrt{(ie^{it})^2}\,dt $$
In order to solve the above integral, I used $u=ie^{it}$ and $-du=e^{it}dt$ and then the integral became:
$$ \int \limits_{\frac{\pi}{2}}^{\frac{3\pi}{2}} \sqrt{u^2} \, du $$ which is equal to (I think...) $$ \frac{u^2}{2} = \frac{i^2e^{2it}}{2} = \frac{-e^{2it}}{2} $$
And if I substitude $\frac{3\pi}{2}$ and $\frac{\pi}{2}$: $$ \frac{-e^{2i(\frac{3\pi}{2})}}{2} - \frac{-e^{2i(\frac{\pi}{2})}}{2} = \frac{-1}{2} - \frac{1}{2} = -1 $$
What is wrong about my answer?
Note that the radius of the circle is $r=|i|=1$.
Let $z=e^{it}$ and $dz = ie^{it}dt$. Then $|z|=|e^{it}|=1$
$$\int_C{|z|}\mathrm{dz}=-\int_{\frac{\pi}{2}}^{\frac{3\pi}{2}}ie^{it}dt=-i\frac{e^{it}}{i}|_{\frac{\pi}{2}}^{\frac{3\pi}{2}}=-e^{\frac{i3\pi}{2}}+e^{\frac{i\pi}{2}}=-(-i)+i=2i$$