√(2+2cosa)
=√(2+2(2cos^2(a/2)-1)
=√(4cos^2(a/2))
=-2cos(a/2)
1+sina+cosa
=1+2sin(a/2)cos(a/2)+2cos^2(a/2)-1
=2cosa/2*(sina/2+cosa/2)
(1+sina+cosa)(sina/2-cosa/2)/√(2+2cosa)
=[2cosa/2*(sina/2+cosa/2)](sina/2-cosa/2)/(-2cosa/2)
=-(sin^2a/2-cos^2a/2)
=cosa