∫Yoboa Math
Home / Integral of x sin(x)
Integral Reference

Integral of x sin(x)

Step-by-step derivation, definite integral examples, and common variants.

A polynomial times a trigonometric function calls for integration by parts. LIATE puts the polynomial first, so u = x and dv = sin(x) dx.

Result

\[ \int x \sin(x)\,dx = \sin(x) - x\cos(x) + C \]

Derivation

Set \(u = x\), \(dv = \sin(x)\,dx\). Then \(du = dx\), \(v = -\cos(x)\).

\[ \int x\sin(x)\,dx = -x\cos(x) - \int (-\cos(x))\,dx = -x\cos(x) + \sin(x) + C \]

Verification: \(\dfrac{d}{dx}[\sin(x) - x\cos(x)] = \cos(x) - \cos(x) + x\sin(x) = x\sin(x)\) ✓

Definite integral examples

\(\int_0^{\pi} x\sin(x)\,dx\)

\[ \Big[\sin(x) - x\cos(x)\Big]_0^{\pi} = (0 - \pi(-1)) - (0 - 0) = \pi \]

\(\int_0^{\pi/2} x\sin(x)\,dx\)

\[ \Big[\sin(x) - x\cos(x)\Big]_0^{\pi/2} = (1 - 0) - 0 = 1 \]

Common variants

IntegralAntiderivativeNotes
\(\int x\cos(x)\,dx\)\(\cos(x) + x\sin(x) + C\)Same method: \(u = x\), \(dv = \cos(x)\,dx\).
\(\int x^2\sin(x)\,dx\)\(2x\sin(x) + (2 - x^2)\cos(x) + C\)Integration by parts applied twice.

Try it in the calculator

Paste any variant below into the step-by-step integral calculator for a full worked solution and graph.

Open in calculator →

Related guides