Solution:
Key idea: We write cos2x=2cos2x−1 so that the fraction splits into 2cosx and secx, both of which have standard integrals. Recall ∫secxdx=log∣secx+tanx∣+C.
Step 1 — Rewrite the numerator.
We use the double-angle formula that contains only cosx.
cos2x=2cos2x−1
Step 2 — Divide each term by cosx.
We split the fraction into two terms.
cosx2cos2x−1=2cosx−cosx1
2cosx−cosx1=2cosx−secx
Step 3 — Integrate term by term.
We know that the integral of cosx is sinx and the integral of secx is log∣secx+tanx∣.
∫(2cosx−secx)dx=2sinx−log∣secx+tanx∣+C
Therefore, ∫cosxcos2xdx=2sinx−log∣secx+tanx∣+C.