Integral of x² sin(2x) (By Parts Solution)

Use integration by parts twice. First set (u=x^2) and (dv=\sin(2x)\,dx), remembering that the inner (2x) adds a factor of (\tfrac12). Then integrate the remaining (x\cos(2x)) term by parts. The result is (-\tfrac{x^2}{2}\cos(2x)+\tfrac{x}{2}\sin(2x)+\tfrac14\cos(2x)+C). Differentiate to check it.

A common snag in this problem is not the choice of method, but the factors and signs. Because the trigonometric functions contain (2x), their antiderivatives include a factor of (\tfrac12). Missing that factor changes the answer, even if the integration-by-parts setup looks right.

Below, I work through each step, explain why the choices fit, and check the final expression by differentiation. The same approach applies to many integrals that multiply a polynomial by a sine or cosine function.

Set up integration by parts

Integration by parts rewrites an integral of a product as a product minus a simpler integral. Its formula is (\int u\,dv=uv-\int v\,du). Here, the polynomial becomes simpler when differentiated, while the sine function is straightforward to integrate once its inner factor is accounted for.

For the integral [ I=\int x^2\sin(2x)\,dx, ] choose [ u=x^2,\qquad dv=\sin(2x)\,dx. ] Then [ du=2x\,dx. ]

To find (v), integrate (\sin(2x)). Since the derivative of (2x) is (2), the antiderivative needs a factor of (\tfrac12): [ v=\int\sin(2x)\,dx=-\frac12\cos(2x). ] You can check this using the chain rule: [ \frac{d}{dx}\left(-\frac12\cos(2x)\right) =-\frac12[-2\sin(2x)] =\sin(2x). ]

Substitute (u), (v), and (du) into the formula: [ I=uv-\int v\,du. ] So [ I=-\frac{x^2}{2}\cos(2x) -\int\left(-\frac12\cos(2x)\right)(2x)\,dx. ] The two factors in the remaining product, (-\tfrac12) and (2x), combine to (-x). The minus sign in the formula then makes the remaining integral positive: [ I=-\frac{x^2}{2}\cos(2x)+\int x\cos(2x)\,dx. ]

Key step: The first application reduces the power of (x) from (x^2) to (x), leaving an integral that still needs attention.

Apply integration by parts a second time

The remaining integral is (J=\int x\cos(2x)\,dx). Apply integration by parts again, this time choosing (u=x) and (dv=\cos(2x)\,dx). This lowers the polynomial factor to a constant and leaves only a basic trigonometric antiderivative to evaluate.

Set [ u=x,\qquad dv=\cos(2x)\,dx. ] Then [ du=dx,\qquad v=\frac12\sin(2x). ] The value of (v) follows from the chain rule: [ \frac{d}{dx}\left(\frac12\sin(2x)\right) =\frac12\cdot 2\cos(2x) =\cos(2x). ]

Now use (\int u\,dv=uv-\int v\,du): [ J=\frac{x}{2}\sin(2x)-\int\frac12\sin(2x)\,dx. ] The remaining integral is [ \int\frac12\sin(2x)\,dx =-\frac14\cos(2x), ] because integrating (\sin(2x)) contributes another factor of (\tfrac12). Therefore, [ J=\frac{x}{2}\sin(2x)+\frac14\cos(2x). ]

A useful sign check is to keep the minus sign from the parts formula visible: [ -\left(-\frac14\cos(2x)\right)=+\frac14\cos(2x). ] That double negative is why the cosine term in (J) is positive.

Combine the two results

The first step gave (I=-\tfrac{x^2}{2}\cos(2x)+J), and the second step evaluated (J). Substituting that expression into the first one gives the antiderivative. Because this is an indefinite integral, include the arbitrary constant (C).

Insert [ J=\frac{x}{2}\sin(2x)+\frac14\cos(2x) ] into [ I=-\frac{x^2}{2}\cos(2x)+J. ] The result is [ \boxed{ \int x^2\sin(2x)\,dx =-\frac{x^2}{2}\cos(2x) +\frac{x}{2}\sin(2x) +\frac14\cos(2x)+C }. ]

Each term has a distinct source: (-\tfrac{x^2}{2}\cos(2x)) comes from the first parts step, while the other two terms come from evaluating (J). Keeping those sources clear can help you spot a missing term or sign.

Part of the answer Comes from Common check
(-\tfrac{x^2}{2}\cos(2x)) First (uv) term (v=-\tfrac12\cos(2x))
(+\tfrac{x}{2}\sin(2x)) Second (uv) term (v=\tfrac12\sin(2x))
(+\tfrac14\cos(2x)) Remaining integral in (J) Keep both negative signs
(+C) Indefinite integration Add one constant

Verify by differentiating

Differentiation checks whether the proposed antiderivative returns the original integrand. Use the product rule on terms that multiply (x) or (x^2), and the chain rule on the trigonometric functions. The extra terms should cancel, leaving exactly (x^2\sin(2x)).

Let [ F(x)=-\frac{x^2}{2}\cos(2x) +\frac{x}{2}\sin(2x) +\frac14\cos(2x). ] Differentiate each term.

For the first term, use the product rule: [ \frac{d}{dx}\left(-\frac{x^2}{2}\cos(2x)\right) =-x\cos(2x)+x^2\sin(2x). ] For the second term: [ \frac{d}{dx}\left(\frac{x}{2}\sin(2x)\right) =\frac12\sin(2x)+x\cos(2x). ] For the third term: [ \frac{d}{dx}\left(\frac14\cos(2x)\right) =-\frac12\sin(2x). ]

Add these derivatives: [ F'(x) =-x\cos(2x)+x^2\sin(2x) +\frac12\sin(2x)+x\cos(2x)-\frac12\sin(2x). ] The (-x\cos(2x)) and (+x\cos(2x)) terms cancel. The sine terms with coefficient (\tfrac12) also cancel. What remains is [ F'(x)=x^2\sin(2x), ] which matches the original integrand.

This check is especially useful here because the likely errors affect coefficients or signs. If differentiation leaves an extra (x\cos(2x)) or (\sin(2x)) term, revisit the second integration-by-parts step.

Common errors and quick checks

The main risks are losing a factor of (\tfrac12), mishandling a minus sign, or forgetting (C). A short check at each stage is more reliable than trying to repair the final expression from memory. Confirm every trigonometric antiderivative by differentiating it.

Possible error Why it happens Quick check
Writing (\int\sin(2x)\,dx=-\cos(2x)) The inner derivative (2) is ignored Differentiate the proposed antiderivative
Writing (\int\cos(2x)\,dx=\sin(2x)) The factor from (2x) is missed The correct factor is (\tfrac12)
Making the (\tfrac14\cos(2x)) term negative The outer minus sign is mishandled Track the two negative signs in (J)
Omitting the constant The result is treated like a definite integral Add (C) to an indefinite integral
Skipping verification A plausible-looking expression may still be wrong Differentiate the complete answer

Why the method works

Integration by parts is useful when differentiating one factor makes it simpler. In this example, differentiating (x^2) gives (2x), and then differentiating (x) gives (1). Repeating the method therefore reduces the polynomial degree until the remaining trigonometric integral is manageable.

The rule of thumb is to choose the polynomial as (u) and the trigonometric factor as (dv) when that makes (du) simpler and (v) straightforward to find. The rule is a guide, not a substitute for checking the resulting integral. Here, it leads from (x^2\sin(2x)) to (x\cos(2x)), then to a basic sine integral.

The number (2) inside each trig function matters throughout. For example, the antiderivative of (\cos(2x)) is not (\sin(2x)), but (\tfrac12\sin(2x)). Check the inner derivative whenever you integrate a trig function with a multiple of (x) as its input.

Frequently asked questions

These short answers address common checks and choices for this calculation. The key ideas are that the integral is indefinite, the argument (2x) creates a chain-rule factor, and the product structure makes integration by parts a natural method.

What is the antiderivative?

It is (-\tfrac{x^2}{2}\cos(2x)+\tfrac{x}{2}\sin(2x)+\tfrac14\cos(2x)+C). You can confirm it by differentiating: the extra product-rule terms cancel, leaving (x^2\sin(2x)).

How many times do I use integration by parts?

Use it twice. The first application changes the original integral into one involving (x\cos(2x)). A second application evaluates that remaining product integral and completes the calculation.

Why is there a factor of (\tfrac12)?

The trig functions have input (2x), whose derivative is (2). To reverse the chain rule when integrating (\sin(2x)) or (\cos(2x)), divide by that inner derivative.

Why is the last cosine term positive?

In the second parts step, the remaining integral is subtracted. But the antiderivative of (\tfrac12\sin(2x)) is (-\tfrac14\cos(2x)). Subtracting that negative expression gives (+\tfrac14\cos(2x)).

Which function should be (u) first?

Choose (u=x^2) and (dv=\sin(2x)\,dx). Differentiating (x^2) lowers its degree, while integrating the sine function is direct once you include the factor of (\tfrac12).

What does the constant (C) mean?

The constant (C) represents any fixed number. All constants have derivative zero, so a whole family of functions share the same derivative (x^2\sin(2x)). That is why an indefinite integral includes (C).

How can I check my result quickly?

Differentiate the full expression term by term. Use the product rule for the terms containing (x) or (x^2), and the chain rule for (\sin(2x)) and (\cos(2x)). The non-target terms should cancel.

What is the most common mistake?

The most common mistake is forgetting the factor of (\tfrac12) when integrating a trig function of (2x). A second frequent error is losing a negative sign in the second integration-by-parts step. Differentiation catches both.

The essential sequence is to reduce the polynomial with integration by parts, keep the chain-rule factors, and verify the result by differentiating. With those checks, the final antiderivative is [ -\frac{x^2}{2}\cos(2x)+\frac{x}{2}\sin(2x)+\frac14\cos(2x)+C. ]

(This article was written by one of our staff writers, Alan Westbrook. Visit our Meet the Team page.)

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *