<s>[INST] Proof of identity $\ln \left|\frac{\sin x}{\cos x - 1}\right| = \ln \left|\frac{\cos x + 1}{\sin x}\right|$ How do you prove this identity:
$$\ln \left|\frac{\sin x}{\cos x - 1}\right| = \ln \left|\frac{\cos x + 1}{\sin x}\right|$$
Mathematica says it's true, but if I try to simplify both sides, I wind up with
$$ \sin^2 x = \cos^2 x - 1$$
which ain't right.
 [/INST] We have
$$\left|\frac{\sin x}{\cos x-1}\right|=\left|\frac{\sin x}{\cos x-1}\cdot \frac{\cos x+1}{\cos x+1}\right|=\left|\frac{\sin x(\cos x+1))}{(\cos x)^2-1}\right|.$$
Now, using $(\cos x)^2+(\sin x)^2=1$, we get 
$$\left|\frac{\sin x}{\cos x-1}\right|=\left|\frac{\sin x(\cos x+1)}{-(\sin x)^2}\right|=\left|\frac{\cos x+1}{-\sin x}\right|=\left|\frac{\cos x+1}{\sin x}\right|.$$
</s>