# Integrating tan(x)

by Omid
Tags: integrating, tanx
 Sci Advisor HW Helper P: 1,123 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 $\cos x < 0$. Anyway you do know to integrate $\tan x$ you just just write it as $$\frac{\sin x}{\cos x}$$?
 Sci Advisor HW Helper PF Gold P: 12,016 The absolute value sign is needed in order to gain the proper integral value of the function $$\frac{1}{x}$$ on intervals where x<0 (Remember, you can't find the natural logarithm of a negative real number among the reals!) To illustrate: Given x>0, we may show that a proper anti-derivative is ln(x). For example, $$\int_{a}^{b}\frac{1}{x}dx=ln(b)-ln(a)=ln(|b|)-ln(|a|)(a,b>0)$$ Let's consider: $$\int_{-b}^{-a}\frac{1}{x}dx$$ Let us make the substitution t=-x: $$\int_{-b}^{-a}\frac{1}{x}dx=\int_{b}^{a}\frac{1}{t}dt=-\int_{a}^{b}\frac{1}{t}dt=-\frac{ln(b)}{ln(a)}$$ Or, further: $$=-\frac{ln(b)}{ln(a)}=\frac{ln(a)}{ln(b)}=ln(|-a|)-ln(|-b|)$$ Hence, we see that a proper anti-derivative valid for both x greater and less than zero is ln|x|