We have,
∫cosx1+cosxdx
On rationalize and we get,
∫cosx1+cosxdx
⇒∫(cosx1+cosx)(1−cosx1−cosx)dx
⇒∫cosx(1−cosx)1−cos2xdx
⇒∫cosx(1−cosx)sin2xdx
⇒∫cosx−cos2xsin2xdx
⇒∫(cscxcotx−cot2x)dx
⇒∫cscxcotxdx−∫cot2xdx
On integrating and we get,
−cscx+cotx+C
Hence, this is the answer.