I'm currently self-studying complex analysis, and I've arrived at the following conundrum:
Let $f(z)=1/z$, and let $C$ denote the circle of radius of $1$ centered at the origin. Then consider the integral $\oint_{C}{f(z)dz}=\int_{0}^{2\pi}{\frac{ie^{i\theta}d\theta}{e^{i\theta}}}$.
On the one hand, cancelling the $e^{i\theta}$ terms leaves $\int_{0}^{2\pi}{i}=2\pi i$, which makes sense because $f$ has a simple pole with residue $1$ at $z=0$.
But on the other hand, if we make the substitution $u=e^{i\theta}$, we then get $\int_{1}^{1}{\frac{du}{u}}=0$. This answer seems like nonsense, but it's not clear to me what exactly went wrong. Any efforts to help clear this up for me would be greatly appreciated. Thanks!
If you consider $u=e^{i\theta}$, the variable $u$ now takes complex value so the integrand $f(u)$ is no longer a complex-valued function of a real variable. The integral becomes a line-integral with starting point = end point, and, in general, such a line-integral not just depends on its starting point and end point (here, they are (1,0)).