If $\frac{1+\sin{\theta}}{\cos{\theta}} = n$, find $\tan{\frac{1}{2}\theta}$. The question is:

If $\cfrac{1+\sin{\theta}}{\cos{\theta}} = n$, find $\tan{\frac{1}{2}\theta}$.

I'm quite confused on how to solve this problem. What trigonometric identities do I use? I tried squaring them and ended with $n^2=\dfrac{1+\sin{\theta}}{1-\sin{\theta}}$ but I suppose that doesn't really help the problem. Any suggestions would be appreciated.

If we also have the "tangent half-angle" identity  $ \ \tan \frac{\theta}{2} \ = \ \frac{1 \ - \ \cos \theta}{\sin \theta} \ \ , \ $ we can approach the problem in this way.  From $ \ n \ = \ \frac{1 \ + \ \sin \theta}{\cos \theta} \ = \ \sec \theta + \tan \theta \ \Rightarrow \ \tan \theta \ = \ n  -  \sec \theta \ \ , \ $ construct a right triangle with this tangent "value".  (We will produce an expression for the hypothenuse $ \ H \ $ shortly.)

It is clear that $ \ \sec \theta \ = \ H \ \ . \ $ We then have
$$  \ \tan \frac{\theta}{2} \ \ = \ \  \csc \theta \  - \ \cot \theta  \ \ = \ \ \frac{H \ - \ 1}{n \ - \ H} \ \  .  $$
From the "Pythagorean theorem", we find
$$ H^2 \ - \ 1 \ \ = \ \ (n \ - \ H)^2 \ \ = \ \ n^2 \ - \ 2nH \ + \ H^2 \ \ \Rightarrow \ \ nH \ \ = \ \ \frac{n^2 \ + \ 1}{2} \ \ . $$
Consequently,
$$  \ \tan \frac{\theta}{2} \ \ = \ \ \frac{nH \ - \ n}{n^2 \ - \ nH} \ \ = \ \   \frac{\left(\frac{n^2 \ + \ 1}{2} \right) \ - \ n}{n^2 \ - \ \left(\frac{n^2 \ + \ 1}{2} \right)} \ \  = \ \ \frac{ n^2 \ + \ 1  \ - \ 2n}{2n^2 \ - \  ( n^2 \ + \ 1 )} $$
$$   = \ \ \frac{ n^2 \ - \ 2n \ + \ 1  }{ n^2 \ - \   1 } \ \ = \ \ \frac{ (n \ - \   1)^2  }{ (n \ + \ 1) · (n \ - \ 1) } \ \ = \ \ \frac{  n \ - \   1   }{  n \ + \ 1  } \ \ .  $$
[This contains elements appearing in the other answers, arrived at in a different way.  This is perhaps inevitable since all of them hinge on the "Pythagorean identity" $ \ \tan^2 \theta \ + \ 1 \ = \ \sec^2 \theta \ $ in some manner.]
