∫dxcosx+sin2x
⇒∫dxcosx(1+2sinx)=cosxdxcos2x(1+2sinx)
⇒cosxdx(1−sin2x)(1+2sinx)
sinx=t
cosxdx=dt
⇒dt(1−t2)(1+2t)=dt(1+t)(1−t)(1+2t)
Breaking into partial fractions
⇒[−dt2(1+t)+4dt3(1+2t)+dt6(1−t)]
=−12ln|1+t|+23ln|1+2t|−16ln|1−t|
=−12ln|1+sinx|+23ln|1+2sinx|−16ln|1−sinx|