TITLE: Looking for $\tan\frac{1}{2}\theta$
QUESTION [1 upvotes]: Given that $$\frac{\cos \theta}{1-\sin\theta}=a,$$ 
how can I find the value of $\tan\frac{1}{2}\theta$?
I went in this way,

but the matter is in the box as shown (the fallacies).

REPLY [1 votes]: $$\frac{\cos\theta}{1-\sin\theta}=a$$
$$\frac{\frac{1-\tan^2\frac{\theta}{2}}{1+\tan^2\frac{\theta}{2}}}{1-\frac{2\tan\frac{\theta}{2}}{1+\tan^2\frac{\theta}{2}}}=a$$
$$\frac{1-\tan^2\frac{\theta}{2}}{1+\tan^2\frac{\theta}{2}-2\tan\frac{\theta}{2}}=a$$
$$(a+1)\tan^2\frac{\theta}{2}-2a\tan\frac{\theta}{2}+(a-1)=0$$
now solve quadratic for $\tan\frac{\theta}{2}$,
$$\tan\frac{\theta}{2}=\frac{2a\pm\sqrt{4a^2-4(a+1)(a-1)}}{2(a+1)}=\frac{a\pm1}{a+1}$$ 
hope it answers
{"set_name": "stack_exchange", "score": 1, "question_id": 1976666}