Solve the given trigonometric function.
=∫cosx−sinx1+sin2xdx
=∫cosx−sinxsin2x+cos2x+2sinxcosxdx
=∫cosx−sinx(cosx+sinx)2dx
Let cosx+sinx=t
Then,
ddx(cosx+sinx)=ddxt
⇒−sinx+cosx=dtdx
⇒(cosx−sinx)dx=dt
Now,
∫dtt2
=∫t−2dt
=t−2+1−2+1
=−1t=−1cosx+sinx
Hence, this is the answer.