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^2 \sin x \, dx. \]


To apply the integration by parts formula we let:

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

Then we use integration by parts

    \begin{align*}  \int x^2 \sin x \, dx &= \int u \, dv \\  &= uv - \int v \, du \\  &= -x^2 \cos x + 2 \int x \cos x \, dx. \end{align*}

Now, we use integration by parts again to evaluate the integral of x \cos x. Let

    \begin{align*}  u &= x & \implies && du &= dx \\  dv &= \cos x \, dx & \implies && v &= \sin x. \end{align*}

Then we have

    \begin{align*}  \int x \cos x \, dx &= \int u \, dv \\  &= uv - \int v \, du \\  &= x \sin x - \int \sin x \, dx \\  &= x \sin x + \cos x + C. \end{align*}

Putting this back into the formula we had above, we then obtain

    \begin{align*}  \int x^2 \sin x \, dx &= -x^2 \cos x + 2 \int x \cos x \, dx \\  &= -x^2 \cos x + 2 (x \sin x + \cos x) + C \\  &= 2x \sin x + 2 \cos x - x^2 \sin x + C. \end{align*}

2 comments

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