# Integrating along the wrong arc

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?

• The fundamental theorem gives us $$\int_1^\infty f(u) \, du + \int_{-\infty}^{-1} f(u) \, du = F(\infty) - F(1) + F(-1) - F(-\infty),$$ so if $F(\infty) = F(-\infty)$, the terms cancel and give equality. Aug 6 '14 at 20:51
• In certain sense, you are deforming your contour in $u$-space from one that passes through the $u$-infinity to a line segment joining the two end points. If you can avoid all singularities during deformation, you will get back the same answer. If not, the two integrals will differ by the residues from encountered poles. For the case described in question, the integrand over the wrong arc has a double pole at the $u$-origin. It just happens the residue there is zero. If the residue isn't zero, you will get into problem in interpreting what that integral over the wrong arc really is. Aug 6 '14 at 22:51

Assume

$$\int_{-\infty}^\infty f(x)\, dx = 0$$

not in the sense of the Cauchy principal value. That is, either the limits are iterated in the usual way or we are using Lebesgue integration. Then we can write

$$0 = \int_{-\infty}^\infty f(x) \, dx = \int_{-\infty}^{-1} f(x)\, dx + \int_{-1}^1 f(x) \,dx + \int_1^\infty f(x) \,dx.$$

By assumption all three terms wind up being finite, and so we can rearrange this to

$$\int_1^{-1} f(x) \,dx = \int_{-\infty}^{-1} f(x) \,dx + \int_1^\infty f(x) \,dx.$$

If you don't want to worry about wrapping around the number line, substitute $\theta' = \theta - \pi$ to get:

$$\int_{\pi/2}^{3\pi/2}\dfrac{1}{1-\cos\theta}\,d\theta = \int_{-\pi/2}^{\pi/2}\dfrac{1}{1-\cos(\theta'+\pi)}\,d\theta' = \int_{-\pi/2}^{\pi/2}\dfrac{1}{1+\cos \theta'}\,d\theta'.$$

Then, apply the substitution $u = \tan \dfrac{\theta'}{2}$ to get an integral from $u = -1$ to $u = 1$.