<s>[INST] Proving Trigonometric Equality I have this trigonometric equality to prove:
$$\frac{\cos x}{1-\tan x}-\frac{\sin x}{1+\tan x}=\frac{\cos x}{2\cos^2x-1}$$
I started with the left hand side, reducing the fractions to common denominator and got this:
$$\frac{\cos x+\cos x\tan x-\sin x+\sin x\tan x}{1-\tan^2x}\\=\frac{\cos x+\cos x(\frac{\sin x}{\cos x})-\sin x+\sin x(\frac{\sin x}{\cos x})}{1-\left(\frac{\sin^2x}{\cos^2x}\right)}\\=\frac{\cos x+\left(\frac{\sin^2x}{\cos x}\right)}{1-\frac{\sin^2}{\cos^2x}}$$and by finding common denominator top and bottom and then multiplying the fractions i got: $$\frac{\cos^2x}{\cos^3x-\cos x\sin^2x}$$ which is far from the right hand side and I don't know what am I doing wrong. What is the correct way to prove this equality?
 [/INST] Here's a hint: $$\frac{\cos x + \frac{\sin x}{\cos x}^2}{1 - \left(\frac{\sin x}{\cos x}\right)^2} = \frac{\frac{\sin x^2 + \cos x^2}{\cos x}}{\frac{\cos x^2 - \sin x^2}{\cos x^2}}.$$
</s>