Expressing $\cos(x)$ and $\sin(x)$ in terms of $\tan(\frac{1}{2} x)$ May I know is there any quick way to express $\cos(x)$ and $\sin(x)$ in terms of $\tan(\frac{1}{2} x)$. I checked that $\cos(x)=\frac{1 - \tan^2(\frac{1}{2} x)}{1+\tan^2(\frac{1}{2} x)}$. I really want to know how could I figure this out quickly, as well as how can I express $\sin(x)$ in terms of $\tan(\frac{1}{2} x)$ .
 Thank you very much for your help. 

Note that\begin{align}\cos(x)&=\cos\left(2\frac x2\right)\\&=\cos^2\left(\frac x2\right)-\sin^2\left(\frac x2\right)\\&=2\cos^2\left(\frac x2\right)-1\\&=\frac2{\tan^2\left(\frac x2\right)+1}-1\\&=\frac{-\tan^2\left(\frac x2\right)+1}{\tan^2\left(\frac x2\right)+1}.\end{align}Can you now do a similar thing with $\sin\left(x\right)$?
