(sin a + sin b)^2 + (cos a + cos b)^2 =sin^2(a)+2sin(a)sin(b) + sin^2(b)+cos^2(a)+2cos(a)cos(b) + cos^2(b) =(sin^2(a)+cos^2(a)) + (sin^2(b)+cos^2(b))+2(cos(a)cos(b)+sin(a)sin(b)) =1 + 1+2cos(a-b)=2(1+cos(a-b))=2(1+2cos^2((a-b)/2)-1)= 4 cos^2((a-b)/2)
(sin a + sin b)^2 + (cos a + cos b)^2 =sin^2(a)+2sin(a)sin(b) + sin^2(b)+cos^2(a)+2cos(a)cos(b) + cos^2(b) =(sin^2(a)+cos^2(a)) + (sin^2(b)+cos^2(b))+2(cos(a)cos(b)+sin(a)sin(b)) =1 + 1+2cos(a-b)=2(1+cos(a-b))=2(1+2cos^2((a-b)/2)-1)= 4 cos^2((a-b)/2)