Home » Blog » Use integration by parts to evaluate the given integral

Use integration by parts to evaluate the given integral

Evaluate the following integral using integration by parts:

    \[ \int x \sin x \cos x \, dx. \]


Since the next exercise is to evaluate \int \sin^2 x \, dx, I’m going to use integration by parts in a way that avoids us having to evaluate that in this exercise. (If we apply integration by parts right away, we seem to end up wanting to evaluate that integral most of the time.) So, instead of going straight to integration by parts we recall the trig identity \sin (2x) = 2 \sin x \cos x and simplify the given integral

    \[ \int x \sin x \cos x \, dx = \frac{1}{2} \int x \sin (2x) \, dx. \]

Now, we use integration by parts, letting

    \begin{align*}  u &= x & \implies && du &= dx \\  dv &= \sin (2x) \, dx & \implies && v &= -\frac{1}{2} \cos (2x). \end{align*}

(We know -\frac{1}{2} \cos (2x) is a primitive for \sin (2x) by using the method of substitution from Section 5.8, or you can differentiate -\frac{1}{2} \cos (2x) and check that the result is \sin (2x).) Now, using integration by parts we have

    \begin{align*}  \int x \sin x \cos x \, dx &= \frac{1}{2} \int x \sin (2x) \, dx \\[9pt]  &= \frac{1}{2} \int u \, dv \\[9pt]  &= \frac{1}{2} \left( uv - \int v \, du \right) \\[9pt]  &= \frac{1}{2} \left( -\frac{x}{2} \cos (2x) + \frac{1}{2} \int \cos (2x) \, dx \right) \\[9pt]  &= -\frac{1}{4} x \cos (2x) + \frac{1}{4} \left( \frac{1}{2} \sin (2x) \right)  + C\\[9pt]  &= \frac{1}{8} \sin (2x) - \frac{1}{4} x \cos (2x) + C. \end{align*}

Point out an error, ask a question, offer an alternative solution (to use Latex type [latexpage] at the top of your comment):