Solution:
Key idea: We factorise cosx in half-angles as a difference of squares. One factor cancels, and the other factor is (twice) the derivative of cos2x+sin2x.
Step 1 — Factorise cosx.
We use the double-angle formula with half-angles and then the difference of two squares.
cosx=cos22x−sin22x
cos22x−sin22x=(cos2x−sin2x)(cos2x+sin2x)
Step 2 — Cancel the common factor.
One factor cos2x+sin2x cancels with the cube in the denominator.
(cos2x+sin2x)3cosx=(cos2x+sin2x)2cos2x−sin2x
Step 3 — Substitute.
We put the bracket in the denominator equal to t.
t=cos2x+sin2x
Differentiating both sides brings out a factor 21 from the half-angles.
dt=21(cos2x−sin2x)dx
We multiply by 2 to get the numerator times dx.
(cos2x−sin2x)dx=2dt
Step 4 — Integrate in terms of t.
The integral becomes 2∫t−2dt.
∫(cos2x+sin2x)2cos2x−sin2xdx=2∫t2dt
2∫t2dt=−t2+C
Step 5 — Return to x.
We put back t=cos2x+sin2x.
−t2+C=−cos2x+sin2x2+C
Therefore, ∫(cos2x+sin2x)3cosxdx=−cos2x+sin2x2+C.