$$\int_{-1}^i |z|^2dz$$
The hint says to parametrize the line segment by $z=-1+(1+i)t$, $0 \le t \le 1$. Below is my attempt.
$$dz=0+(1+i)dt$$
$$dz=(1+i)dt$$
Solving for $|z|^2$:
$$|z|^2=(\sqrt{(-1)^2+(1+i)^2})^2$$ $$=1+1+2i-1$$ $$=1+2i$$
Plugging into new integral:
$$\int_0^1 (1+2i)(1+i)dt$$ $$=\int_0^1 (-1+3i)dt$$
$$=-t+3it |_{0}^1$$ $$=-1+3i$$
However, the answer given is $2(1+i)/3$...where might I have gone wrong?
The absolute square should not be a complex number.
$$z = -1 + (1+i)t$$ $$z = -1 + t + it$$ $$z = (-1 + t) + it$$
So:
$$|z| = \sqrt{t^2 + (t-1)^2}$$ $$|z|^2 = t^2 + (t-1)^2 $$