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?