Let $\displaystyle \gamma$ be the square with vertices 0, 1, $\displaystyle \imath+1$, $\displaystyle \imath$ traversed counterclockwise. Evaluate

$\displaystyle \int_{\gamma}{|z|^2dz}$.

I parametrized and then deduced the formula:

$\displaystyle \int _{\gamma }\left|z|^2dz\right.=\sum _{i=1}^4 \int _{\gamma _i}|\gamma _i(t)|^2\gamma _i'(t)dt$. I come up with -1+$\displaystyle \imath$ as the answer. Please verify, thank you.