Remember that #cos(theta)=sin(90^@-theta)#
and that #cos(90^@)=0#
So #cos^2(1)+....+cos^2(89)+cos^2(90)# #color(white)("XXX")=cos^2(1)+...+cos^2(89)# #color(white)("XXX")=sin^2(89)+...+sin^2(1)# #color(white)("XXX")=sin^2(1)+...+sin^2(89)#
If #s=cos^2(1)+...+cos^2(89)#
then #color(white)("XXX")2s=cos^2(1)+...+cos^2(89)# #color(white)("XXXXX")underline(+sin^2(1)+...+sin^2(89))# #color(white)("XXXXX")=underbrace(1color(white)("XXX")+...+color(white)("X")1)_("89 times")#