cos40 + cos60 + cos80 + cos160
= cos(60-20)+ cos60 + cos(60+20)+cos(180-20)
= cos60cos20 + sin60sin20 + cos60 + cos60cos20 -sin60sin20 + cos180cos20 + sin180sin20
= 1/2 cos20 + 1/2 + 1/2 cos20 -cos20 +0
=1/2
cos40 + cos60 + cos80 + cos160
= cos(60-20)+ cos60 + cos(60+20)+cos(180-20)
= cos60cos20 + sin60sin20 + cos60 + cos60cos20 -sin60sin20 + cos180cos20 + sin180sin20
= 1/2 cos20 + 1/2 + 1/2 cos20 -cos20 +0
=1/2