3
$\begingroup$

I encountered this very simple problem recently, but I got stuck on it because I think I am missing something.

It is easy to see that indefinite integral $\int\frac{1}{\cos^2(x)}dx$ is $\tan(x)+C$. Also because $\frac{1}{\cos^2(x)}\geq0$ with the inequality being strict on some interval, the definite integral $\int_0^{2\pi}\frac{1}{\cos^2(x)}dx$ should be strictly positive. But when I evaluate it using the indefinite form result, I get $\tan(2\pi)-\tan(0)=0$, which puzzles me.

I guess this may be common in trigonometric integration and that there should be a trick to get the actual result, but could someone shed some light on this problem?

$\endgroup$
4
  • 5
    $\begingroup$ You have to break it up into smaller integrals because it's improper, with discontinuities at $\pi/2, 3\pi/2$. $\endgroup$ Dec 22 '14 at 10:53
  • 5
    $\begingroup$ Integrating between $0$ and $\pi/2$ reveals a problem... $\endgroup$
    – user65203
    Dec 22 '14 at 11:01
  • 5
    $\begingroup$ This integral does not converge. $\endgroup$
    – Alex Silva
    Dec 22 '14 at 11:08
  • $\begingroup$ Thanks a lot to all of you! So it is common to break improper integrals into pieces to evaluate them. In this example the function is discontinuous at $\frac{\pi}{2}+k\pi$, but I have encountered the problem with continuous functions as well, so I guess there is no general rule about how to split the integral. $\endgroup$
    – Valentin
    Dec 22 '14 at 23:55
2
$\begingroup$

$$\int_0^{2\pi} \frac{1}{\cos^2x}dx$$ Since the integrand is periodic in $x$ with period $\pi$, we have $$2\int_0^{\pi} \frac{1}{\cos^2x}dx$$ Also note that the integrand is vertically asymptotic at $x=\frac{\pi}{2}$, so now we have $$ 2\lim\limits_{a\to\frac{\pi}{2}^-}\int_0^a \frac{1}{\cos^2x}dx+ 2\lim\limits_{b\to\frac{\pi}{2}^+}\int_b^\pi \frac{1}{\cos^2x}dx$$ $$ =2\lim\limits_{a\to\frac{\pi}{2}^-} \left[\tan(a)-\tan(0)\right]+ 2\lim\limits_{b\to\frac{\pi}{2}^+} \left[\tan(\pi)-\tan(b)\right]$$ $$ =2\lim\limits_{a\to\frac{\pi}{2}^-} \left[\tan(a)\right]- 2\lim\limits_{b\to\frac{\pi}{2}^+} \left[\tan(b)\right]=\infty$$ Therefore $$\int_0^{2\pi} \frac{1}{\cos^2x}dx\Rightarrow \mbox{diverges}$$

$\endgroup$
2
$\begingroup$

This is a trigonometric analog to the classic paradox that

$$\int_{-1}^1{1\over x^2}dx={-1\over x}\Big|_{-1}^1=-1-1=-2$$

despite the fact that $1/x^2$ is strictly positive, hence its definite integral should give a positive result for the area beneath the curve. The explanation (as given by k170), lies in the fact that improper integrals have to be given careful treatment.

$\endgroup$

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.