I tried evaluating the integral $\int_{-\pi/3}^{\pi/3} \tan (\theta)$.

I keep getting $\ln(2) - \ln(2) = 0$, but my textbook says its $\ln(4)$.

I'm not sure what I am doing wrong because when I look at the symmetry of $\tan(\theta)$, its symmetric.

  • 1
    $\begingroup$ Maybe you dropped absolute values, and original was to integrate $|\tan \theta|$ with your bounds (but place the smaller one at the bottom of the definite integral). This would give $2\cdot \ln 2=\ln 4.$ $\endgroup$
    – coffeemath
    Jan 24, 2015 at 20:39

2 Answers 2


The answer in your textbook is wrong. $x\mapsto\tan x$ is an odd function, hence

$$ \int_{-a}^{a}\tan\theta\,\mathrm d\theta=0, $$

for all $a\in\left(-\tfrac\pi2,\tfrac\pi2\right)$.

  • 2
    $\begingroup$ How about for all $$a \in \left( - \frac{\pi}{2}, \frac{\pi}{2} \right)?$$ You avoid dealing with issues like $\displaystyle \tan \left( \frac{\pi}{2} \right)$. $\endgroup$ Jan 24, 2015 at 20:39
  • $\begingroup$ @MarkFantini That's what I wanted to say at first but I mistakenly forgot it. Thanks for correcting me. $\endgroup$
    – Workaholic
    Jan 24, 2015 at 20:41

We have $$\int \tan(x)dx = -\ln\left|\cos(x)\right|+C$$ hence $$\int_{-\pi/3}^{\pi/3} \tan(x)dx = -\ln\left|\cos\left(\frac{\pi}{3}\right)\right|+\ln\left|\cos\left(\frac{-\pi}{3}\right)\right| \\ = -\ln\left|\frac{1}{2}\right|+\ln\left|\frac{1}{2}\right| \\ = 0$$ so you are right. Looks like the book probably incorrectly evaluated to $$-\ln\left|\frac{1}{2}\right|-\ln\left|\frac{1}{2}\right| = -2\ln\left|\frac{1}{2}\right| \\ = \ln\left|\left(\frac{1}{2}\right)^{-2}\right| \\ = \ln\left|4\right|$$ This is a great example of how dropping a minus sign can drastically change things.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .