AP Calculus BC
Integral of x sin 2x: Answer, Proof, and Steps
The integral of x sin(2x) is -(x cos(2x))/2 + sin(2x)/4 + C. Integration by parts with u = x and dv = sin(2x) dx gives v = -cos(2x)/2, and the leftover integral of cos(2x)/2 supplies the sin(2x)/4 term.
Setting up parts
A polynomial multiplied by a sine is the standard integration by parts case. Differentiating removes it entirely, and integrating keeps the trig factor the same size.
Two separate things happen inside : the antiderivative of sine carries a minus sign, and the inside coefficient 2 divides.
Finishing and checking
Substituting into the formula, the minus sign in meets the minus sign in front of , so the remaining integral enters with a plus.
Differentiate to confirm. The product rule on the first term gives , and the second term gives . The cosine pieces cancel, leaving .
The mistake students make
Almost every wrong answer here is a sign, not a method. Writing without the minus sign negates the whole answer, since that one sign rides through both terms, while forgetting the minus in front of flips only the second term. Differentiating separates them: the first slip returns , and the second returns .
The other slip is dropping the in , which comes from the inside coefficient. Both terms in the final answer inherit that half, which is why the second one lands on a 4 in the denominator rather than a 2.
One derivative settles it
Differentiating your answer takes about fifteen seconds and catches every sign error. If the product rule does not return exactly, the mistake is upstream in .
Every answer on this page is machine checked
An automated test differentiates the antiderivative above and confirms it returns the integrand. A wrong sign or a missing factor fails the build, so it cannot reach you.
Frequently asked questions
Where does the plus sign on sin 2x over 4 come from?
From two minus signs meeting. is negative, and the parts formula subtracts , so the leftover integral enters positive.
Can u-substitution do this instead?
No. Setting clears the inside coefficient but leaves , still a product of two different kinds of function. The stray is not a multiple of the derivative of anything inside, so substitution alone cannot finish it.
What is the definite integral from 0 to pi/2?
Evaluate at both ends. At , and , giving ; at both terms vanish. The integral is .