Can someone please explain these steps to me?
\begin{align*} \int \tan (x) dx&= \int \frac{\sin(x)}{\cos(x)} dx\\[3pt] &= - \int \frac d{dx} \ln(\cos(x)) dx\\[3pt] &= - \ln(\cos(x)) + C \end{align*}
I obviously understand step one to step two, but no further.
I'm thinking (perhaps incorrectly) that $\frac d{dx} \ln(\cos(x))$ gives the $\frac 1{\cos(x)}$ but I don't see where the $\sin(x)$ went.