Let given expression be denoted by E
E=cos4π8+cos43π8+cos45π8+cos47π8
E=cos4π8+cos43π8+cos4(π−3π8)+cos4(π−π8)
=cos4π8+cos43π8+cos43π8+cos4π8
[∵ cos(π−θ)=−cosθ]
=2(cos4π8+cos43π8)
E=2(cos4π8+cos4(π2−π8))
=2(cos4π8+sin4π8)
[∵cos(π2−θ)=sinθ]
=2((cos2π8)2+(sin2π8)2)
=2[(cos2π8+sin2π8)2−2cos2π8sin2π8]
[∵ a2+b2=(a+b)2−2ab]
=2−4cos2π8sin2π8
[∵sin2θ+cos2θ=1]
E=2−4cos2π8sin2π8
=2−sin2(π4) [∵sin2θ=2sinθcosθ]
=2−(1√2)2
=2−12
=32