The intergral for cosx is sinx, but '2x' must be considered.
When differentiating a sinx/cosx function, the '2x' would be differentiated separately
and placed in the front (multipling). So when intergating you do the opposite and divide.
Therefore the intergral is 1/2sin(2x). You can check by differentiating 1/2sin(2x).