At the risk of piling on after correct answers have already been given, I’ll offer another way to address this problem. Recall that, if θ is real, cos()=Re() cos ( θ ) = R e ( e i θ ) . So, with A and B real,
(+)+(−)=(+−)=2cos() e i ( A + B ) + e i ( A − B ) = e i A ( e i B + e − i B ) = 2 e i A cos ( B )
Finally,
cos(+)+cos(−)=Re((+)+(−))=Re(2cos()) cos ( A + B ) + cos ( A − B ) = R e ( e i ( A + B ) + e i ( A − B ) ) = R e ( 2 e i A cos ( B ) )