# what is the integral $\int_{-\pi/3}^{\pi/3} \tan (\theta)$?

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.

• 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.$ Jan 24, 2015 at 20:39

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)$.
• 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)$. Jan 24, 2015 at 20:39
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.