cos(2x)-cos(3x)-cos(4x)+cos(5x)=(cos(5x)+cos(2x))-(cos(4x)+cos(3x))=
=2cos(7x/2)*cos(3x/2)-2cos(7x/2)*cos(x/2)=
=2cos(7x/2)*(cos(3x/2)-cos(x/2))=2cos(7x/2)*(-2sin(x)*sin(x/2)=
=-4sin(x/2)*cos(7x/2)*sin(x)
cos(2x)-cos(3x)-cos(4x)+cos(5x)=(cos(5x)+cos(2x))-(cos(4x)+cos(3x))=
=2cos(7x/2)*cos(3x/2)-2cos(7x/2)*cos(x/2)=
=2cos(7x/2)*(cos(3x/2)-cos(x/2))=2cos(7x/2)*(-2sin(x)*sin(x/2)=
=-4sin(x/2)*cos(7x/2)*sin(x)