In deriving the half-angle formulas, my textbook first says: "Let's take the following identities:"
$$\cos^2\left(\frac a2\right)+\sin^2\left(\frac a2\right)=1;$$
$$\cos^2\left(\frac a2\right)-\sin^2\left(\frac a2\right)=\cos(a);$$
These identities I know. But then the texbook says "through addition and subtraction, we respectively arrive at:"
$$2\cos^2\left(\frac a2\right)=1+\cos(a)$$ $$2\sin^2\left(\frac a2\right)=1-\cos(a)$$
I failed to catch what exactly is added and what is substracted to arrive from the first two formulas to the second pair. Give me a hint, please.