<s>[INST] If $\tan{\frac{x}{2}}=\csc x - \sin x$, then find the value of $\tan^2{\frac{x}{2}}$. 
If $\tan{\frac{x}{2}}=\csc x - \sin x$, then find the value of $\tan^2{\frac{x}{2}}$.

HINT: The answer is $-2\pm \sqrt5$.
What I have tried so far:
$$\tan{\frac{x}{2}} = \frac{1}{\sin x}-\sin x$$
$$\tan{\frac{x}{2}} = \frac{1-\sin^2 x}{\sin x}$$
$$\tan{\frac{x}{2}} = \frac{\cos^2 x}{\sin x}$$
I don't know how to solve this problem. Pls help. Thank you :)
 [/INST] $$\cos^2x=\tan\dfrac x2\sin x=\dfrac{\sin\dfrac x2}{\cos\dfrac x2}\cdot2\sin\dfrac x2\cos\dfrac x2=2\sin^2\dfrac x2=1-\cos x$$
$$\implies\cos x=\dfrac{-1\pm\sqrt5}2$$
As for real $x,\cos x\ge-1,\cos x\ne\dfrac{-1-\sqrt5}2<-1$
Using Weierstrass Substitution $$\dfrac{1-\tan^2\dfrac x2}{1+\tan^2\dfrac x2}=\cos x=\dfrac{-1+\sqrt5}2$$
Now apply Componendo et Dividendo
</s>