# 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.

-
That's why you don't just throw away absolute value signs. – David Mitra May 11 '12 at 18:53
Something went wrong in your simplification. Anyway: multiply numerator and denominator of the stuff within the logarithm of the left hand side with $\cos\,x+1$, use the Pythagorean identity, cancel what can be canceled, and note that $|-x|=|x|$. – J. M. May 11 '12 at 18:55

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|.$$

-
Awesome! Thank you. It didn't occur to me to manipulate it without removing the log and absolute value signs. – Matt Gregory May 11 '12 at 19:02
WHY are you keeping the "$\ln$" there? That's just clutter. Prove it without "$\ln$", then tack the "$\ln$" on later. – Michael Hardy May 11 '12 at 19:15
@MichaelHardy You are right, I realize it too late, and it was long to type. – Davide Giraudo May 11 '12 at 20:22

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.

-
Thanks! That's very helpful. I wish I could "accept" both answers. – Matt Gregory May 11 '12 at 19:07

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$$

-

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.

-