Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I'm trying to compute $\int \tan(x) dx$. I tried to decompose it to $\int\sin(x)\cdot\cos(x)^{-1} dx$ and use per partes method. Then I stucked at $-\ln(\cos(x))+\int\frac{\cos(x)\cdot\ln(\cos(x))}{\sin(x)} dx$ but that seems to go nowhere, or I just don't know how to continue.

Could anybody do whole computation?

share|improve this question
add comment

3 Answers

up vote 3 down vote accepted

Integration by parts will only complicate things. I suggest using substitution: $u=\cos x$. Then $du=-\sin xdx$ and so you have $$\int \tan x\, dx=-\int\frac{du}u$$

share|improve this answer
You are right, that's so simple. Thanks :) –  user50222 Dec 30 '12 at 12:53
add comment

Just substitute $u=\cos x$; then $du=-\sin x~dx$, and the integral becomes $$\int\tan x~dx=-\int\frac{du}u\;.$$

share|improve this answer
add comment

$$\int \tan xdx=\int\frac{\sec x\tan xdx}{\sec x}$$

Putting $\sec x=z, dz=\sec x\tan x dx$

$\int\frac{\sec x\tan xdx}{\sec x}=\int\frac{dz}z=\log |z|+C=\log|\sec x|+C=-\log|\cos x|+C$

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.