cos^2(a+b)+cos^2b-2cosa*cosb*cos(a+b)
=cos^2(a+b)-2cosa*cosb*cos(a+b)+cos^2b
=cos(a+b)[cos(a+b)-2cosa*cosb]+cos^2b
=cos(a+b)[cosa*cosb-sina*sinb-2cosa*cosb]+cos^2b
=-cos(a+b)(cosa*cosb+sina*sinb)+cos^2b
=-cos(a+b)[cos(a-b)]+cos^2b
=-(1/2)*{cos[(a+b)+(a-b)]+cos[(a+b)-(a-b)]}+cos^2b
=-(1/2)*[cos(2a)+cos(2b)]+cos^2b
=-(1/2)*[cos(2a)+2cos^2b-1]+cos^2b
=-(1/2)*cos(2a)-cos^2b+(1/2)+cos^2b
=-cos(2a)/2+(1/2)
=-(1-2sin^2a)/2+(1/2)
=sin^2a