My question for my exam on linear algebra was to evaluate the integral $\displaystyle \oint \operatorname{im}(z^2)dz$ , where integration is done under area bounded by vertices $0$, $1$, $i$ in the complex plane.
Since $\operatorname{im}(z^2)=2xy$, is the answer $0$?
*EDIT:- I am posting a picture of the question below enter image description here
On the paths $[0,1]$ and $[i,0]$, the function is $0$, hence its path integral is too.
On $[1,i]$ we have to compute it. This path is parametrised by $\begin{cases}x=1-t\\y=t\end{cases}(0\le t\le 1)$, so we just have to compute $$\int_{[1,i]}\operatorname{im}z^2\,\mathrm d z=\int_0^{1}\!2t(1-t)\, (-1+i)\,\mathrm d t=(-1+i)\biggl[t^2-\frac{2t^3}3\biggr]_0^1=\frac{-1+i}3.$$