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$


$$\frac { 1-\sin { x } +\cos { x }  }{ 1+\sin { x } +\cos { x }  } =\frac { \sin ^{ 2 }{ \left( \frac { x }{ 2 }  \right) +\cos ^{ 2 }{ \left( \frac { x }{ 2 }  \right)  } -2\sin { \left( \frac { x }{ 2 }  \right)  } \cos { \left( \frac { x }{ 2 }  \right)  } +\cos ^{ 2 }{ \left( \frac { x }{ 2 }  \right)  } -\sin ^{ 2 }{ \left( \frac { x }{ 2 }  \right)  }  }  }{ \sin ^{ 2 }{ \left( \frac { x }{ 2 }  \right) +\cos ^{ 2 }{ \left( \frac { x }{ 2 }  \right)  } +2\sin { \left( \frac { x }{ 2 }  \right)  } \cos { \left( \frac { x }{ 2 }  \right)  } +\cos ^{ 2 }{ \left( \frac { x }{ 2 }  \right)  } -\sin ^{ 2 }{ \left( \frac { x }{ 2 }  \right)  }  }  } =\\\ =\frac { 2\cos ^{ 2 }{ \left( \frac { x }{ 2 }  \right)  } -2\sin { \left( \frac { x }{ 2 }  \right)  } \cos { \left( \frac { x }{ 2 }  \right)  }  }{ 2\cos ^{ 2 }{ \left( \frac { x }{ 2 }  \right)  } +2\sin { \left( \frac { x }{ 2 }  \right)  } \cos { \left( \frac { x }{ 2 }  \right)  }  } =\\=\frac { \cos { \left( \frac { x }{ 2 }  \right)  } -\sin { \left( \frac { x }{ 2 }  \right)  }  }{ \cos { \left( \frac { x }{ 2 }  \right)  } +\sin { \left( \frac { x }{ 2 }  \right)  }  } =\frac { { \left( \cos { \left( \frac { x }{ 2 }  \right)  } -\sin { \left( \frac { x }{ 2 }  \right)  }  \right)  }^{ 2 } }{ \left( \cos { \left( \frac { x }{ 2 }  \right)  } +\sin { \left( \frac { x }{ 2 }  \right)  }  \right) \left( \cos { \left( \frac { x }{ 2 }  \right)  } +\sin { \left( \frac { x }{ 2 }  \right)  }  \right)  } =\\ =\frac { 1-\sin { x }  }{ \cos { x }  }  $$

