$$\int \tan x \, dx \equiv \ln|\sec x|$$
What's the significance of the modulus?
I remember doing a question using this formula, and had a negative answer inside the log, so I gave up - because I was using the log with normal brackets.
I know you can't log a negative, but that doesn't help me understand why this mod is here.
Real values integrate to real values, so if we didn't have the modulus symbol we would be taking the natural logarithm of a negative number when $\sec x < 0$. Hope it helps.