Evaluate
Split by linearity. Each piece is a polynomial times a trigonometric function, the standard shape for integration by parts:
In both, choose (which differentiates away to ) and the sine part.
First integral: . With , , so and :
The inner factors of come from the chain rule on and are the easiest thing to lose here.
Evaluate the first integral on . At : and , giving . At : both terms vanish. So
Simpson quadrature returns ✓, matching .
Second integral: . With , , so :
At : . At : . So , confirmed numerically as ✓.
Subtract to finish.
Direct Simpson quadrature of the original integrand gives ✓, agreeing to eight decimals.
Sanity-check the sign. On the term is negative throughout, while contributes a positive hump on and a larger negative one on — larger because the weight is bigger there. Both parts therefore pull the total negative, consistent with .
Need to solve a different problem like this? Open the solver →