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.

The above method is really verifying and always quick. Another method to arrive at the answer is by rationalising denominator (mainly when the answer [or RHS] is not known or one is asked to work out only from LHS to RHS):
$$\frac{\sin x - \cos x + 1 }{\sin x + \cos x - 1 }\cdot \frac{\sin x + \cos x + 1}{\sin x + \cos x + 1}$$
$$\frac{ (\sin x + 1)^2 - \cos^2 x }{ 2 \sin x \cos x } $$
$$ \frac{ \sin^2 x + 2 \sin x + 1 - \cos^2 x }{ 2 \sin x \cos x } $$
$$ \frac{  \sin^2 x + 2 \sin x + \sin^2 x + \cos^2 x - \cos^2 x } {2 \sin x \cos x } $$
and the answer follows i.e. $$ \frac{\sin x + 1}{\cos x}. $$     
Hope it was helpful.
