What is the integral of the secant between $0$ and $\pi$? The secant function has a discontinuity at $\pi/2$, so I separated the integral as:
$\int_0^{\pi}{\sec(\theta) d\theta} = \int_0^{\pi/2}{\sec(\theta) d\theta} + \int_{\pi/2}^{\pi}{\sec(\theta) d\theta}.$
Computing these improper integrals as a limit, we obtain:
$\int_0^{\pi/2}{\sec(\theta) d\theta} = +\infty,$
$\int_{\pi/2}^{\pi}{\sec(\theta) d\theta} = -\infty$.
Is the original integral convergent or divergent?
 A: The original integral diverges. If we have a function $f\colon[a,b]\setminus\{c\}\longrightarrow\Bbb R$ (with $a,b,c\in\Bbb R$ and $a<c<b$) then we say that the improper integral $\int_a^bf(x)\,\mathrm dx$ converges when both integrals $\int_a^cf(x)\,\mathrm dx$ and $\int_c^bf(x)\,\mathrm dx$ converge. In this case, they both diverge.
A: Note that $\sec(\theta) = 1/\cos(\theta)$, and that the cosine is an odd function around $\theta = \pi/2$. That is, for $\theta\in [\pi/2,\pi]$ we have $\cos(\theta) = -\cos(\pi - \theta)$. We can then rewrite:
$\int_{\pi/2}^{\pi}{\sec(\theta) d\theta} = \int_{\pi/2}^{\pi}{\frac{1}{\cos(\theta)} d\theta} = \int_{\pi/2}^{\pi}{\frac{1}{-\cos(\pi - \theta)} d\theta} = \int_{\pi/2}^{\pi}{\frac{-1}{\cos(\pi - \theta)} d\theta} = \int_{\pi/2}^{0}{\frac{1}{\cos(\varphi)} d\varphi} = - \int_0^{\pi/2}{\sec(\varphi) d\varphi}$
where we have used the change of variable $\varphi = \pi - \theta$. Now:
$\int_0^{\pi}{\sec(\theta) d\theta} = \int_0^{\pi/2}{\sec(\theta) d\theta} + \int_{\pi/2}^{\pi}{\sec(\theta) d\theta} = \int_0^{\pi/2}{\sec(\theta) d\theta} -\int_{0}^{\pi/2}{\sec(\varphi) d\varphi} = 0.$
Edit: I guess this only computes the principal value of the integral, it does not address convergence.
