I am trying to calculate this contour integral using the parameterization $z(t) = e^{it}$ where $0 \leq t \leq 2\pi$. We then have $z'(t) = ie^{it}$ so our contour integral becomes
$\int_{C}f(z)dz = \int_{0}^{2\pi}f(z(t))z'(t)dt = \int_{0}^{2\pi}\frac{e^{it}}{2(e^{it})^2+1}ie^{it}dt$
Now if I perform the substitution $u = e^{it}$, then our integral becomes $\int_{1}^{1}\frac{u}{2u^2 + 1}du = 0$, however Mathematica evalutes this integral to be $i\pi$. I believe there must be some assumption i'm making here that isn't valid. Any insight would be greatly appreciated.