# How do you integrate int xcos(3x) by integration by parts method?

Dec 31, 2016

The goal of integration by parts is to differentiate one of the terms in the product so that it becomes $1$, leaving only one term to be integrated. Take a look at this problem to understand better.

Let $u = x$ and$\mathrm{dv} = \cos \left(3 x\right) \mathrm{dx}$. To apply the integration by parts formula, we need $v$ and $\mathrm{du}$. $\mathrm{du} = \mathrm{dx}$. We can find $v$ through $u$-substitution.

Let ${u}_{2} = 3 x$. Then ${\mathrm{du}}_{2} = 3 \mathrm{dx}$ and $\mathrm{dx} = \frac{{\mathrm{du}}_{2}}{3}$

We can rewrite:

$= \int \left(\cos {u}_{2}\right) \cdot \frac{{\mathrm{du}}_{2}}{3}$

$= \frac{1}{3} \int \cos {u}_{2} {\mathrm{du}}_{2}$

$= \frac{1}{3} \sin {u}_{2}$

Since ${u}_{2} = 3 x$:

$= \frac{1}{3} \sin \left(3 x\right)$

Thus, $v = \frac{1}{3} \sin \left(3 x\right)$.

The integration by parts formula is $\int \left(u \mathrm{dv}\right) = u v - \int \left(v \mathrm{du}\right)$.

$\int \left(x \cos \left(3 x\right)\right) \mathrm{dx} = \frac{1}{3} \sin \left(3 x\right) \cdot x - \int \left(1 \cdot \frac{1}{3} \sin \left(3 x\right) \mathrm{dx}\right)$

$\int \left(x \cos 3 x\right) \mathrm{dx} = \frac{1}{3} x \sin \left(3 x\right) - \int \left(\frac{1}{3} \sin \left(3 x\right) \mathrm{dx}\right)$

We repeat the substitution process performed above to integrate $\frac{1}{3} \sin \left(3 x\right)$

Let $u = 3 x$. Then $\mathrm{du} = 3 \mathrm{dx}$ and $\mathrm{dx} = \frac{1}{3} \mathrm{du}$

$= \int \frac{1}{3} \sin u \cdot \frac{1}{3} \mathrm{du}$

$= \frac{1}{9} \int \sin u \mathrm{du}$

$= - \frac{1}{9} \cos u$

$= - \frac{1}{9} \cos \left(3 x\right)$

The integral of the entire expression is therefore:

$\int \left(x \cos 3 x\right) \mathrm{dx} = \frac{1}{3} x \sin 3 x + \frac{1}{9} \cos 3 x + C$, where$C$ is a constant.

Hopefully this helps!