Unclear step in the proof of half-angle formula for tangent I wonder how could 
$$2\cos^2\left(\frac a2\right)$$
be transformed into
$$1+\cos(a)$$
This is from a step in my textbook's proof of the tangent half-angle formula:
$$tan\left(\frac a2\right) = .. =\frac {2\sin\left(\frac a2\right)\cos\left(\frac a2\right)}{2\cos^2\left(\frac a2\right)} \to \frac {\sin(a)}{1+\cos(a)}$$
I understand the transformation in the numerator, but the denominator puzzles me. 
 A: Since we have $$\begin{align}\cos(a)&=\cos\left(\frac a2+\frac a2\right)\\&=\cos^2\left(\frac a2\right)-\sin^2\left(\frac a2\right)\\&=\cos^2\left(\frac a2\right)-\left(1-\cos^2\left(\frac a2\right)\right)\\&=2\cos^2\left(\frac a2\right)-1\end{align}$$
we have $$ 2\cos^2\left(\frac a2\right)=1+\cos (a).$$
A: Hints:
$$\cos 2x=\cos^2x-\sin^2 x=\cos^2x-(1-\cos^2 x)=2\cos^2 x-1$$
A: I found a simpler way that employs a double-angle identity for $cos$. In the second step of my textbook's proof, we multiply the numerator and the denominator by $2cos\left(\frac a2\right)$:
$$tan\left(\frac a2\right) = \frac{sin\left(\frac a2\right)}{cos\left(\frac a2\right)} =\frac {2\sin\left(\frac a2\right)\cos\left(\frac a2\right)}{2\cos^2\left(\frac a2\right)}$$
The nominator simplifies to $sin(a)$ using a double-angle identity. At the same time, we add a plus one and a minus one to the denominator:
$$\frac {sin(a)}{1+2\cos^2\left(\frac a2\right)-1}$$
But hey, $2\cos^2\left(\frac a2\right)-1$ equals $cos(a)$, as follows from the double-angle identity for $cos$:
$$cos(2u)=cos^2(u)-sin^2(u)=cos^2(u)-(1-cos^2(u))=2cos^2(u)-1$$
Hence, with $\left(\frac a2\right)$ as $u$, which means that $2u$ is simply $a$, we get
$$tan\left(\frac a2\right) = ... = \frac {sin(a)}{1+cos(a)}$$
(kudos to Julie Harland)
