Solution:
We know that, (cosx+sinx)2=cos2x+sin2x+2sinxcosx
(cosx+sinx)2cos2x=cos2x+sin2x+2sinxcosxcos2x
And also we know that, cos2x+sin2x=1 and 2sinxcosx=sin2x,
Then,
=1+sin2xcos2x
By applying the integrals, we get,
∫(cosx+sinx)2cos2xdx=∫1+sin2xcos2xdx
Let us assume that, 1+sin2x=t
So, 2cos2xdx=dt
By substituting above values, we get,
∫(cosx+sinx)2cos2xdx=21∫t1dt
On integrating,
=21log∣t∣+C
Now, by substituting the value of ' t ' we get,
=21log∣1+sin2x∣+C
=21log(cosx+sinx)2+C
=log∣sinx+cosx∣+C