# How do I find the integral int(x*cos(5x))dx ?

Aug 1, 2014

We will keep in mind the formula for integration by parts, which is:

$\int u \mathrm{dv} = u v - \int v \mathrm{du}$

To find this integral successfully we will let $u = x$, and $\mathrm{dv} = \cos 5 x \mathrm{dx}$. Therefore, $\mathrm{du} = \mathrm{dx}$ and $v = \frac{1}{5} \sin 5 x$. ($v$ can be found using a quick $u$-substitution)

The reason I chose $x$ for the value of $u$ is because I know that later on I will end up integrating $v$ multiplied by $u$'s derivative. Since the derivative of $u$ is just $1$, and since integrating a trig function by itself doesn't make it any more complex, we've effectively removed the $x$ from the integrand and only have to worry about the sine now.

So, plugging into the IBP's formula, we get:

$\int x \cos 5 x \mathrm{dx} = \frac{x \sin 5 x}{5} - \int \frac{1}{5} \sin 5 x \mathrm{dx}$

Pulling the $\frac{1}{5}$ out of the integrand gives us:

$\int x \cos 5 x \mathrm{dx} = \frac{x \sin 5 x}{5} - \frac{1}{5} \int \sin 5 x \mathrm{dx}$

Integrating the sine will only take a $u$-substitution. Since we've already used $u$ for the IBP's formula I'll use the letter $q$ instead:

$q = 5 x$
$\mathrm{dq} = 5 \mathrm{dx}$

To get a $5 \mathrm{dx}$ inside the integrand I'll multiply the integral by another $\frac{1}{5}$:

$\int x \cos 5 x \mathrm{dx} = \frac{x \sin 5 x}{5} - \frac{1}{25} \int 5 \sin 5 x \mathrm{dx}$

And, replacing everything in terms of $q$:

$\int x \cos 5 x \mathrm{dx} = \frac{x \sin 5 x}{5} - \frac{1}{25} \int \sin q \cdot \mathrm{dq}$

We know that the integral of $\sin$ is $- \cos$, so we can finish this integral off easily. Remember the constant of integration:

$\int x \cos 5 x \mathrm{dx} = \frac{x \sin 5 x}{5} + \frac{1}{25} \cos q + C$

Now we will simply substitute back $q$:

$\int x \cos 5 x \mathrm{dx} = \frac{x \sin 5 x}{5} + \frac{\cos 5 x}{25} + C$

And there is our integral.