$\ln|\cos x| = \ln|1/\sec x| = \ln|(\sec x)^{-1}|=-\ln|\sec x|$
Is what I am doing valid? Or is it not correct because of the absolute function?
$\ln|\cos x| = \ln|1/\sec x| = \ln|(\sec x)^{-1}|=-\ln|\sec x|$
Is what I am doing valid? Or is it not correct because of the absolute function?
No, what you are doing is wrong because $\cot x=\frac{1}{\tan x}$.
But I would like to point out that $$\ln |\cos x|=-\ln |\sec x|$$ Is true, as $|a||\frac{1}{a}|=1$ is always true. The absolute function does not hinder it one bit. (well, it does as it makes it both positive. but it does not effect the multiple).
Not at all. Suppose $\ln|\cos x|=-\ln|\cot x|$; the expression makes sense only if $\cos x\ne0$, $\cot x\ne0$ and $\cot x$ is defined, so for $x\ne k\pi/2$ (for $k$ an integer).
Then the equality is equivalent to $$ |\cos x|=\frac{1}{|\cot x|},\qquad x\ne k\pi/2 $$ that is, to $$ |\cos x|(|\sin x|-1)=0,\qquad x\ne k\pi/2 $$ No $x$ satisfies these conditions.