Key idea: Multiply the numerator and denominator by cosx. This produces cosxdx for the substitution t=sinx, and cos2x=(1−sinx)(1+sinx) turns the integrand into a rational function of t with a repeated factor, which we split into partial fractions.
Step 1 — Multiply by cos x and substitute.
We multiply the numerator and denominator by cosx and write cos2x=(1−sinx)(1+sinx).
I=∫cos2x(1−sinx)sinxcosxdx
I=∫(1−sinx)2(1+sinx)sinxcosxdx
Now put t=sinx, so dt=cosxdx.
I=∫(1−t)2(1+t)tdt
Step 2 — Set up the partial fractions.
The factor (1−t) is repeated, so it needs two terms.
(1−t)2(1+t)t=1−tA+(1−t)2B+1+tD
t=A(1−t)(1+t)+B(1+t)+D(1−t)2
Step 3 — Find A, B and D.
We put t=1, which removes the A and D terms.
1=2B
B=21
We put t=−1, which removes the A and B terms.
−1=4D
D=−41
We compare the coefficients of t2: the left side has none, and the right side has −A+D.