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").
I doubt that the second equation can be derived from nothing but the first, and I don't see how the Wikipedia article implies that.
With $\cos(2\alpha)=\cos^2\alpha-\sin^2\alpha$, thus $1+\cos(2\alpha)=2\cos^2\alpha$, and with $\sin(2\alpha)=2\sin\alpha\cos\alpha$, we have $\tan\alpha=\sin(2\alpha)/(1+\cos(2\alpha))$, and thus
$$\tan\left(\frac\theta2\right)=\frac{\sin\theta}{1+\cos\theta}$$
and likewise
$$\tan\left(\frac E2\right)=\frac{\sin E}{1+\cos E}\;.$$
Above the equations you quote, the article has
$$\cos E = \frac{ e + \cos \theta }{1 + e \cos \theta }$$
and
$$\sin E = \frac{ \sqrt{1 - e^2} \, \sin \theta }{1 + e \cos \theta }\;.$$
Substituting those in the formula for $\tan(E/2)$ and then using the one for $\tan(\theta/2)$ yields your second equation.