<s>[INST] Simplify $\frac{1-\sin(x)+\cos(x)}{1+\sin(x)+\cos(x)}$ 
Which one is equivalent to: $$\frac{1-\sin(x)+\cos(x)}{1+\sin(x)+\cos(x)}$$
  1)$\dfrac{\cos(x)}{1+\sin(x)}$
  2)$\dfrac{\cos(x)}{1-\sin(x)}$
  3)$\dfrac{1-\sin(x)}{\cos(x)}$
  4)$\dfrac{1+\sin(x)}{\cos(x)}$

Of course we can find the correct choice by testing each of them,but I'm looking for an analytical solution assuming we don't know the final expression.
I tried the following techniques,all failed: multiplying by $\frac{\sin(x)}{\sin(x)}$ ,  multiplying by $\frac{\cos(x)}{\cos(x)}$ , using $\sin^2(x)+\cos^2(x)=1$
 [/INST] Multiply numerator and denominator by $1-\sin x+\cos x$: you get
\begin{align}
\frac{1-\sin x+\cos x}{1+\sin x+\cos x}
&=\frac{(1-\sin x+\cos x)^2}{(1+\cos x)^2-\sin^2x} \\[6px]
&=\frac{1+\sin^2x+\cos^2x-2\sin x+2\cos x-2\sin x\cos x}{1+2\cos x+\cos^2x-(1-\cos^2x)}\\[6px]
&=\frac{2(1-\sin x+\cos x-\sin x\cos x)}{2\cos x(1+\cos x)}\\[6px]
&=\frac{(1-\sin x)(1+\cos x)}{\cos x(1+\cos x)}
\end{align}
</s>