We will keep in mind the formula for integration by parts, which is:
∫udv=uv−∫vdu
To find this integral successfully we will let u=x, and dv=cos5xdx. Therefore, du=dx and v=15sin5x. (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:
∫xcos5xdx=xsin5x5−∫15sin5xdx
Pulling the 15 out of the integrand gives us:
∫xcos5xdx=xsin5x5−15∫sin5xdx
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=5x
dq=5dx
To get a 5dx inside the integrand I'll multiply the integral by another 15:
∫xcos5xdx=xsin5x5−125∫5sin5xdx
And, replacing everything in terms of q:
∫xcos5xdx=xsin5x5−125∫sinq⋅dq
We know that the integral of sin is −cos, so we can finish this integral off easily. Remember the constant of integration:
∫xcos5xdx=xsin5x5+125cosq+C
Now we will simply substitute back q:
∫xcos5xdx=xsin5x5+cos5x25+C
And there is our integral.