Let
$\int_\gamma z(e^{z^2}+1)dz,$
where $\displaystyle \gamma(t)=e^{it},t \in \left[0,\frac{\pi}{2}\right]$.
In order to apply Cauchy's integral formula, I'll set $f(z)=z^2\left(e^{z^2}+1\right)$ and rewrite
$\int_\gamma z(e^{z^2}+1)dz=\int_\gamma \frac{f(z)}{z} dz.$
$f(0)=0$, so we would have $\int_\gamma z(e^{z^2}+1)dz=0$
Unfortunately, this seems to be wrong, because another evaluation from the source, where I've taken this integral yields $\displaystyle \frac{e^{-1}-e}{2}-1$. Where did I make a mistake?