Explanation of derivation made at wikipedia. in this wikipedia article A deriviation to convert true and eccentric anomaly. I am however quite stunned by a single line - trying to reproduce but after half a dozen sheets of paper I can't find how it is done.
The problem lies in the following:
$$\tan(E) = \frac{\sqrt{1-e^2} \sin(\theta)}{e + \cos(\theta)}$$
$$\tan \left( \frac{\theta}{2}\right) = \sqrt{\frac{1+e}{1-e}} \cdot \tan \left( \frac{E}{2}\right)$$
I am really stuck in how to get from the first line to the second line (which is at wikipedia explained by a single word "also").

Going backwards,
$$\tan(E)=\tan(2\frac E2)=\frac{2\tan(\frac E2)}{1-\tan^2(\frac E2)}\\
=\frac{2\sqrt{\dfrac{1-e}{1+e}}\tan(\frac \theta2)}{1-\dfrac{1-e}{1+e}\tan^2(\frac\theta2)}\\
=\frac{2\sqrt{1-e^2}\sin(\frac \theta2)\cos(\frac \theta2)}{(1+e)\cos^2(\frac\theta2)-(1-e)\sin^2(\frac\theta2)}\\
=\frac{\sqrt{1-e^2}\sin(\theta)}{e+\cos(\theta)}.$$
