How do I verify $\frac{(\sin x - \cos x + 1)}{(\sin x + \cos x-1)}=\frac{\sin x + 1}{\cos x}$? I need to verify this trigonometric identity for an assignment:$$\frac{(\sin x - \cos x + 1)}{(\sin x + \cos x-1)}=\frac{\sin x + 1}{\cos x}$$
I've tried a few different approaches, but I end up getting lost in messy equations and no immediately visible equivalence between the two sides. I'd appreciate some help! 
Also, it's not necessery to give me the direct answer. Some helpful hints about which first steps to take would be better, so I can find the right direction to go in and then go on to solve it myself.
 A: Hint
What about this approach?
$$\frac a b=\frac c d\iff ad=bc$$
A: multiply the numerator and denominator   of the left side of the by $\sin {x}+ \cos{s}+1$
A: For verifying the identity where you already know the simplified answer, Sami's approach is the most direct. Here's what I would do if I didn't already know the right-hand side: whenever I see mixed sines and cosines in a denominator, I want to turn as many of them into squared trig functions as possible, so that I can use the main trig identity $\sin^2+\cos^2=1$. To that end, I would try multiplying top and bottom of your first fraction by $\sin x + \cos x + 1$, and then simplifying.
A: Let $t=\tan(x/2)$; then it's well known that $\sin x=2t/(1+t^2)$ and $\cos x=(1-t^2)/(1+t^2)$; therefore, canceling common denominators,
$$
\frac{\sin x-\cos x+1}{\sin x+\cos x-1}=
\frac{2t-1+t^2+1+t^2}{2t+1-t^2-1-t^2}=
\frac{2t(1+t)}{2t(1-t)}=\frac{1+t}{1-t}
$$
Can you simplify the other side in a similar way?
Of course, verifying that
$$
(\sin x-\cos x+1)\cos x=(\sin x+1)(\sin x+\cos x-1)
$$
is easier, but transforming expressions in $\sin x$ and $\cos x$ in the proposed way is a rather powerful tool in other situations.
