AP Calculus BC
Integral of x cos 2x: Answer, Proof, and Steps
The integral of x cos(2x) is (x sin(2x))/2 + cos(2x)/4 + C. Integration by parts with u = x and dv = cos(2x) dx leaves the integral of sin(2x)/2, which supplies the cos(2x)/4 term. Differentiating the result returns x cos(2x).
Choosing u and dv
The integrand is a polynomial times a trig function, and the polynomial gets simpler when differentiated while the cosine costs nothing to integrate. That pairing is the signal for integration by parts.
Take and . Then , and is an antiderivative of , which carries the usual division by the inside coefficient.
Running the formula
Assemble . The new integral has no left in it, which is the whole point of letting be the polynomial.
Since , the half out front makes the leftover piece , and subtracting a negative adds.
Check it by differentiating. The product rule on the first term gives , and the second term gives . The two sine pieces cancel and is left.
The mistake students make
The common misstep is choosing and . Nothing about that is illegal, but it moves backwards: , and the new integral has a higher power of than the original. Parts is progress only when the leftover integral is simpler.
The second error is writing and losing the . That single slip doubles both terms, because becomes and the leftover integral becomes , so the answer is exactly twice the correct one. Differentiating it returns rather than .
Pick u so it dies
For a polynomial times a sine, cosine, or exponential, let be the polynomial. Each round of parts drops its degree by one, so the process terminates instead of cycling.
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
Why is v equal to sin 2x over 2 rather than sin 2x?
has to be an antiderivative of , and . Dividing by 2 undoes that inside coefficient.
Do I need a constant of integration when I find v?
No. Any single antiderivative works, and the simplest one keeps the algebra clean. A constant added to contributes equal and opposite amounts to and , so it cancels.
Can I use tabular integration here?
Yes. Differentiate down to 0, integrate twice to get then , and pair the rows with alternating signs. You get . With a first-degree polynomial the table runs three rows and yields only two products, so it saves little over writing the parts formula out.