Solution:
Key idea: Split the fraction into two parts and recognise standard derivatives: dxd(cotx)=−cosec2x and dxd(cosecx)=−cosecxcotx.
Step 1 — Split the fraction.
We divide each term of the numerator by sin2x.
sin2x1+cosx=sin2x1+sinxcosx⋅sinx1
sin2x1+cosx=cosec2x+cotxcosecx
Step 2 — Integrate the standard forms.
We use ∫cosec2xdx=−cotx and ∫cosecxcotxdx=−cosecx.
I=−cotx−cosecx+C
Therefore, ∫sin2x1+cosxdx=−cotx−cosecx+C.