Easy trigonometry question How is
$$\frac{2 \sin x}{(1+ \cos x)^2}= \tan\left(\frac{x}{2}\right)\sec^2\left(\frac{x}{2}\right)\;?$$
It should be easy.
But somehow I don't get it.
Can you help me with this? 
 A: $$\frac{2 \sin x}{(1+ \cos x)^2}=\frac{4 \sin\left(\frac{x}{2}\right)\cos\left(\frac{x}{2}\right)}{\left[1+ \cos^2\left(\frac{x}{2}\right)-\sin^2\left(\frac{x}{2}\right)\right]^2}=\frac{4 \sin\left(\frac{x}{2}\right)\cos\left(\frac{x}{2}\right)}{\left[2 \cos^2\left(\frac{x}{2}\right)\right]^2}=\tan\left(\frac{x}{2}\right)\sec^2\left(\frac{x}{2}\right)$$
A: If you know the usual cosine half-angle identity
$$
2\cos^2\frac x2 = 1+\cos x
$$
and the usual tangent half-angle identity
$$
\tan\frac x2=\frac{\sin x}{1+\cos x}\tag{1}
$$
then you can say
$$
\sec^2\frac x2=\frac{2}{1+\cos x}\tag{2}
$$
and then multiply $(1)$ and $(2)$.
A: $$\frac{2 \sin x}{(1+ \cos x)^2}=\frac{4 \sin \frac{x}{2}\cos \frac{x}{2}}{(1+ 2\cos^2 \frac{ x}{2}-1)^2}=\frac{ \sin \frac{x}{2}\cos \frac{x}{2}}{( \cos^4 \frac{ x}{2})}=\tan\frac{x}{2}\sec^2\frac{x}{2}$$
A: HINT:
Use $$\sin x=\frac{2\tan\frac x2}{1+\tan^2\frac x2},\cos x=\frac{1-\tan^2\frac x2}{1+\tan^2\frac x2}$$
A: Another derivation starts, as in Michael Hardy's answer, with the tangent half-angle formula (one of my all-time favorites)
$$
\begin{align}
\tan(\theta/2)
&=\frac{\sin(\theta)}{1+\cos(\theta)}&&\text{tangent half-angle formula}\tag{1}\\
&=\frac{2\sin(\theta/2)\cos(\theta/2)}{1+\cos(\theta)}&&\text{sine double-angle formula}\\
\sec^2(\theta/2)&=\frac2{1+\cos(\theta)}&&\begin{array}{}\tan/\sin=\sec\\\sec/\cos=\sec^2\end{array}\tag{2}
\end{align}
$$
Multiply $(1)$ by $(2)$ to get
$$
\tan(\theta/2)\sec^2(\theta/2)=\frac{2\sin(\theta)}{(1+\cos(\theta))^2}\tag{3}
$$
A: Put $z= \exp(ix)$, then the left becomes
$$\frac{(z-1/z)/i}{(1+(z+1/z)/2)^2}
= \frac{(z^3-z)/i}{(z+(z^2+1)/2)^2} 
= \frac{(z^3-z)/i}{(z+1)^4/4}
= \frac{(z^2-z)/i}{(z+1)^3/4}.$$
The right becomes
$$ \frac{(z^{1/2}-z^{-1/2})/i}{z^{1/2}+z^{-1/2}} \times \frac{4}{(z^{1/2}+z^{-1/2})^2}
= \frac{4((z^{1/2}-z^{-1/2})/i)}{(z^{1/2}+z^{-1/2})^3} = 
\frac{4(z^2-z)/i}{(z+1)^3}.$$
The two sides are equal, QED. (This is how computer algebra systems verify these sorts of identities.)
