I'm currently learning derivatives and antiderivatives. In a solution to one of the question, it mentions
$$-\ln|\cos x| +C=\ln|\cos x|^{-1}+C= \ln|\sec x|+C$$
I am puzzled by what rules this transformation uses. Could someone please kindly point it out to me.
Edit 1:
I think my main confusion is the use of absolute value and natural log in one place.
You should read $\ln |\cos x|^{-1}$ as
$$\ln(|\cos x|^{-1})$$
and $-\ln |\cos x|$ as
$$(-1) \ln(|\cos x|)$$
Now remember the rules that $a \ln(b) = \ln(b^a)$ and $\frac{1}{\cos x} = \sec x$.
The absolute value does not affect the log rule - it's inside the log, and so effectively stands for a number, albeit variable, being passed into it.