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.
 A: The equation $$\ln \left|\frac{\sin x}{\cos x - 1}\right| = \ln \left|\frac{\cos x + 1}{\sin x}\right|\tag{1}\;,$$ is equivalent to $$\left|\frac{\sin x}{\cos x - 1}\right| = \left|\frac{\cos x + 1}{\sin x}\right|\;,\tag{2}$$ which is equivalent to $$|\sin x|^2=|\cos x-1||\cos x+1|\;,\tag{3}$$ for all values of $x$ for which $(1)$ makes sense (i.e., $x\ne n\pi$ for integer $n$). Thus, $(1)$ is equivalent to $$\sin^2 x=|\cos^2x-1|\tag{4}$$ for all values of $x$ for which $(1)$ makes sense. 
But $0\le\cos^2 x\le 1$ for all $x$, so $|\cos^2x-1|=1-\cos^2x$, and $(4)$ is equivalent to the familiar Pythagorean identity for all $x$. As noted, the steps are reversible for all $x$ for which $(1)$ makes sense, so $(1)$ is indeed an identity.
A: 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|.$$
A: Since $2 \ln|a| = \ln(a^2)$ we have: 
$$
 \ln \left| \frac{\sin(x)}{\cos(x)-1}\right| = 
 \ln \left| \frac{\cos(x)+1}{\sin(x)}\right| \quad \implies \quad  \ln\left( \left( \frac{\sin(x)}{\cos(x)-1}\right)^2\right) = 
 \ln \left(\left( \frac{\cos(x)+1}{\sin(x)}\right)^2\right)
$$
That implies equality of arguments of logarithms. Then it is simple trigonometry:
$$
  \left( \frac{\sin(x)}{\cos(x)-1}\right)^2 = \left( \frac{\cos(x)+1}{\sin(x)}\right)^2 \quad \implies \quad \sin^4(x) = \left(1-\cos^2(x)\right)^2
$$
A: It's enough to resort to the following elementary formula:
$$\ln|x| - \ln |y|= \ln|\frac {x}{y}|$$
Therefore, we get that:
$$\ln \left|\frac{\sin x}{\cos x - 1}\right| - \ln \left|\frac{\cos x + 1}{\sin x}\right| = \ln \left|\frac{\sin^2 x}{\cos^2 x - 1}\right|= \ln \left|\frac{\sin^2 x}{-\sin^2 x}\right|= \ln{1} = 0$$
The proof is complete. 
