2
$\begingroup$

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 got stuck 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 the whole computation?

3 Answers 3

3

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$

  • 0
    You are right, that's so simple. Thanks :)2012-12-30
3

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

1

$\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$