Geometry behind $\int_{0}^{2π}\frac{e^{ix}}{e^{ix}-z}~dx=2\pi(|z|<1)$ It's a nice exercise to prove, 
$$\int_{0}^{2π}\frac{e^{ix}}{e^{ix}-z}~dx=2\pi(|z|<1)$$ using Leibneiz's rule.But,what's the geometrical interpretation of this?Any idea?

Multiplying by $i$, we get, with $w=e^{ix}$,
$$
\oint_{|w|=1}\frac{\mathrm{d}w}{w-z}=2\pi i\,[|z|\lt1]\tag1
$$
The function $\frac1{w-z}$ has residue $1$ at $w=z$, and this simply states that $z$ is inside the contour $|w|=1$ when $|z|\lt1$ and outside when $|z|\gt1$.
When $|z|=1$, $(1)$ only converges in the principal value sense to $\pi i$.
