Here's a dumb question to which I'd post my own answer if I weren't feeling too lazy right now, but maybe other points of view than mine are worth seeing too. $$ \int_{\pi/2}^{3\pi/2} \frac{1}{1-\cos\theta} \,d\theta $$ Do the tangent half-angle substitution (often incorrectly called the Weierstrass substitution): $$ \begin{align} u & = \tan\frac\theta2 \\[8pt] \frac{1-u^2}{1+u^2} & = \cos\theta \\[8pt] \frac{2\,du}{1+u^2} & = d\theta \end{align} $$ The integral becomes $$ \int_1^{-1} \left( \begin{array}{c} \text{a rational function} \\ \text{that is quite simple} \\ \text{after routine algebra} \end{array} \right)\,du = \cdots\cdots $$ and it's all routine.
But if you think about how $u$ behaves as $\theta$ goes from $\pi/2$ to $3\pi/2$, it seems it should have been $$ \left(\int_1^\infty + \int_{-\infty}^{-1} \right) \left( \begin{array}{c} \text{a rational function} \\ \text{that is quite simple} \\ \text{after routine algebra} \end{array} \right)\,du = \cdots\cdots. $$ Between any two points on the (topological) circle $\mathbb R\cup\{\infty\}$ (where $\infty$ is at both ends of the line) there are two arcs, and we picked the wrong one. But it didn't matter. When does it matter and when doesn't it?