<s>[INST] Prove the following trigonometric identity. $$\frac{\sin x - \cos x +1}{\sin x + \cos x -1}=\frac{\sin x +1}{\cos x}$$  
I tried substituting $\sin^2x+\cos^2x = 1$ but I cannot solve it.
 [/INST] $(\sin x- \cos x+1)\cos x = \sin x \cos x -\cos^2 x +\cos x$
$(\sin x+ \cos x-1)(\sin x +1) = \sin^2 x + \sin x \cos x +\cos x -1 = \sin x \cos x +\cos x +(\sin^2 x -1)= \sin x \cos x -\cos^2 x +\cos x$
</s>