I was evaluating the elementary integral: $$\int_0^{2\pi} \sec^2\frac{x}{2}dx$$ Evaluating the expression and substituting limits, we get, $$2\bigg[\tan\frac{x}{2}\bigg]_0^{2\pi}=2\bigg[\tan \frac{2\pi}{2}-\tan\frac{0}{2}\bigg]=2\bigg[0-0\bigg]=0$$ This seems like a valid solution, except, when I run it on Wolfram or Integral Calculator, it says the integral is divergent.

Where am I going wrong? How is the integral divergent?

  • $\begingroup$ The integrand is not defined at $\pi$... $\endgroup$ – TheSimpliFire Feb 18 '18 at 15:07
  • $\begingroup$ You can see why it does diverge because at $x = \pi$ it's not defined. If you split the integral into $\int_0^{\pi} + \int_{\pi}^{2\pi}$ you will see it. $\endgroup$ – Von Neumann Feb 18 '18 at 15:08
  • $\begingroup$ You could spot that the function $\sec^2x$, which is positive, can't have an integral which is zero. $\endgroup$ – Michael Feb 18 '18 at 15:10
  • $\begingroup$ @TheSimpliFire Actually, it is defined at $\pi$... $\endgroup$ – José Carlos Santos Feb 18 '18 at 15:12
  • $\begingroup$ @JoséCarlosSantos No it's not. The integrand is $\sec^2(x/2)$, not $\sec^2x$ :) $\endgroup$ – TheSimpliFire Feb 18 '18 at 15:14

Note that $\sec$ is not defined at $\pi$. So, your integral is really the sum of several improper integrals, the first one of which is$$\lim_{u\to\pi^-}\int_0^u\sec^2\left(\frac x2\right)\,\mathrm dx.$$This integral diverges.


The integral is not defined at $x = \pi$. You can however calculate the principal value:

$$\text{PV} = \lim_{\epsilon \to \pi} \left(\int_{0}^{\epsilon} + \int_{\epsilon}^{2\pi}\right) \sec^2\left(\frac{x}{2}\right)\ dx$$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.