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.
 A: $$\mathrm{cosec} A+\mathrm{cotan} A=\frac{1}{\sin A}+\frac{\cos A}{\sin A}=\frac{1+\cos A}{\sin A}\\=\frac{1+\cos A}{\sin A}\frac{\cos A+\sin A-1}{\cos A+\sin A-1}\\=\frac{\cos A+\sin A-1+\cos^2 A+\sin A\cos A-\cos A}{\sin A\cos A+\sin^2 A-\sin A}\\\underbrace{=}_{(1)}\frac{\sin A-1+\cos^2 A+\sin A\cos A}{\sin A\cos A+\sin^2 A-\sin A}\\\underbrace{=}_{(2)}\frac{\sin A-\sin^2 A+\sin A\cos A}{\sin A\cos A+\sin^2 A-\sin A}\\\underbrace{=}_{(3)}\frac{1-\sin A+\cos A}{\cos A+\sin A-1},$$ where:
in $(1)$ we cancel $\cos A$ and $-\cos A$ in the numerator;
in $(2)$ we use $\sin^2A+\cos^2 A=1;$ 
in $(3)$ we divide numerator and denominator by $\sin A.$ 
A: Hint: A good way to start would be to rewrite the right-hand side in terms of sines and cosines, and to multiply the numerator and denominator of the left-hand side by $(\cos A-\sin A-1).$
A: Like Need help in proving that $\frac{\sin\theta - \cos\theta + 1}{\sin\theta + \cos\theta - 1} = \frac 1{\sec\theta - \tan\theta}$,
Dividing the numerator & the denominator by $\sin A,$
$$\frac{\cos A - \sin A + 1}{\cos A + \sin A - 1}=\frac{\cot A-1+\csc A}{\cot A+1-\csc A}$$
$$=\frac{\cot A+\csc A-(\csc^2A-\cot^2A)}{\cot A+1-\csc A}$$
$$=(\cot A+\csc A)\cdot\frac{\{1-(\csc A-\cot A)\}}{\cot A+1-\csc A}=?$$
A: 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}$$
A: $$\begin{align}
\csc A+\cot A&=\frac 1{\sin A}+\frac{\cos A}{\sin A}=\frac{1+\cos A}{\sin A}\\
=&\frac{1-\cos^2A}{\sin A(1-\cos A)}=\frac{\sin A}{1-\cos A}
\end{align}$$
Therefore
$$1+\cos A=k\sin A$$
and
$$\sin A=k(1-\cos A)$$
for some $k$.
Now
$$\frac{\cos A-\sin A+1}{\cos A+\sin A-1}=\frac{k\sin A-\sin A}{k(1-\cos A)+\cos A-1}=\frac{(k-1)\sin A}{(k-1)(1-\cos A)}$$
A: $$(\cos A-\sin A+1)\sin A=\cos A\sin A-\sin^2A+\sin A$$
$$=\cos A\sin A-(1-\cos^2A)+\sin A=\sin A(1+\cos A)-(1-\cos A)(1+\cos A)$$
$$\implies(\cos A-\sin A+1)\sin A=(1+\cos A)(\sin A-1+\cos A)$$
$$\implies\frac{\cos A-\sin A+1}{\sin A-1+\cos A}=\frac{1+\cos A}{\sin A}=?$$
A: Here is a method that I use when I really get stuck.
$$LHS\cdot\frac{RHS}{RHS}=\frac{LHS}{RHS}\cdot RHS$$
Now all that is left to do is to prove that $\dfrac{LHS}{RHS}=1$
Applying that method to this particular problem we have
$$\begin{array}{lll}
\frac{\cos A-\sin A +1}{\cos A+\sin A -1}&=&\frac{\cos A-\sin A +1}{\cos A+\sin A -1}\cdot\frac{\csc A+\cot A}{\csc A+\cot A}\\
&=&\frac{\frac{\cos A-\sin A +1}{\sin A}}{\frac{\cos A+\sin A -1}{\sin A}}\cdot\frac{\csc A+\cot A}{\csc A+\cot A}\\
&=&\frac{\cot A - 1 + \csc A}{\cot A+1 -\csc A}\cdot\frac{\csc A+\cot A}{\csc A+\cot A}\\
&=&\frac{\cot A - 1 + \csc A}{(\cot A+1 -\csc A)(\csc A+\cot A)}\cdot(\csc A+\cot A)\\
\end{array}$$
Multiplying out the denominator we have
$$\cot A\csc A+\csc A\color{blue}{-\csc^2A+\cot^2A}+\cot A-\csc A\cot A$$
But rearranging the identity
$$\begin{array}{lll}
\cot^2A+1&=&\csc^2A\\
\color{blue}{\cot^2A-\csc^2A}&=&\color{blue}{-1}\\
\end{array}$$
our denominator becomes
$$\color{green}{\csc A \color{blue}{-1}+\cot A}$$
continuing our proof
$$\begin{array}{lll}
&=&\frac{\cot A - 1 + \csc A}{(\cot A+1 -\csc A)(\csc A+\cot A)}\cdot(\csc A+\cot A)\\
&=&\frac{\cot A - 1 + \csc A}{\color{green}{\csc A -1 +\cot A}}\cdot(\csc A+\cot A)\\
&=&1\cdot(\csc A+\cot A)\\
&=&\csc A+\cot A
\end{array}$$
