How to use integration by parts three times
With a polynomial times a trig function, one round of integration by parts can leave us with another product. The next product is easier because differentiating the polynomial lowers its degree. We’ll repeat that until the integral is just a trig function.
Choose the part whose derivative gets simpler
Use . For , set and .
Apply the rule to the two remaining products
For , use and . Carry that minus sign into the expression.
The last application gives . Putting everything together gives
Differentiating the answer cancels the lower-degree terms and leaves .