<s>[INST] Proving $\displaystyle\frac{\cos A - \sin A + 1}{\cos A + \sin A - 1} = \csc A + \cot A$ I got this question from a paper but can't solve it and the question paper has no solutions section.How do you prove this?
$$\displaystyle\frac{\cos A - \sin A + 1}{\cos A + \sin A - 1} = \csc A + \cot A$$
Thanks in advance.
 [/INST] Here I derive the rhs by simplification. 
Use $\displaystyle \sin x = \frac{2\tan\frac{x}{2}}{1+\tan^2\frac{x}{2}}$ and $\displaystyle \cos x = \frac{1-\tan^2\frac{x}{2}}{1+\tan^2\frac{x}{2}}$ to write 
$$\begin{align}\frac{\cos x - \sin x +1}{\cos x + \sin x -1}&=\frac{\frac{1-\tan^2\frac{x}{2}}{1+\tan^2\frac{x}{2}}
- \frac{2\tan\frac{x}{2}}{1+\tan^2\frac{x}{2}} +1}
{\frac{1-\tan^2\frac{x}{2}}{1+\tan^2\frac{x}{2}} 
+ \frac{2\tan\frac{x}{2}}{1+\tan^2\frac{x}{2}} -1}\\
&=\cot \frac{x}{2}\\
&=\frac{1+\cos x}{\sin x}
\end{align}$$
</s>