$\cos(a+b)=\cos(a)\cos(b)-\sin(a)\sin(b)$

so

$\cos(2a)=\cos^2(a)-\sin^2(a)=2\cos^2(a)-1$

so

$\cos^2(a)=\dfrac{1+\cos(2a)} 2$

You can also write

$\cos(2a)=\cos^2(a)-\sin^2(a)=1-2\sin^2(a)$

so

$\sin^2(a)=\dfrac{1-\cos(2a)} 2$

and

$\cos^4(a)=\left(\dfrac{1+\cos(2a)} 2\right)^2$

$\sin^4(a)=\left(\dfrac{1-\cos(2a)} 2\right)^2$