My book did something confusing. I'm not sure how to get from one step to the other.

Step 1: $\displaystyle y = - \left. \frac{ln|cos(2x)|}{2}\right| _0^\frac{\pi}{6}$

to...

Step 2: $\displaystyle y = -[-\frac{ln(2)}{2} - 0]$

But I got $\displaystyle cos 2x $ when $\displaystyle \frac{\pi}{6}$ is $\displaystyle \frac{\pi}{3}$ and $\displaystyle cos \frac{\pi}{3} = \frac{1}{2}. $

How did it turn into 2 instead of 1/2? And also, where did the $\displaystyle -$ sign in front of the whole thing come from?

The original problem is to evaluate: $\displaystyle y = \int_0^ \frac{\pi}{6} tan(2x)dx$

I appreciate the help! Thank you!