# Can't figure out this integral

dark_omen
Hello,

I am having trouble with this integral, I don't know how to solve it.

integral(x * cos(x))dx
I tried it in the calculator and it gave me the integral back, and I don't know what method of integration to use to figure it out.
Well if anyone has a solution that would be great, thanks.

## Answers and Replies

Mentor
What do you get when you differentiate x * sin(x)?

How about x^2 * sin(x)?

Do these give you some ideas about what you could differentiate to get to x * cos(x)?

Homework Helper
Gold Member
dark_omen said:
Hello,

I am having trouble with this integral, I don't know how to solve it.

integral(x * cos(x))dx
I tried it in the calculator and it gave me the integral back, and I don't know what method of integration to use to figure it out.
Well if anyone has a solution that would be great, thanks.
I would suggest integration by parts. There is on choice of "u" and "dv" that will lead to a very simple form after a single integration by part.s

dark_omen
Okay, I had to do integration by parts twice and I got:
((x^2 * cos(x))/6) + ((x^2 * cos(x))/3), I don't know if that is right though but it's what I came up with.

Quaoar
dark_omen, that answer is not correct.

Here's my solution:

u = x
dv = cos x dx

So:
du = dx
v = sin x

uv - I(v * du) = x sin x - I(sin x dx) = x sin x + cos x.

I've verified this answer in Mathematica as well.

dark_omen
Okay, so I guess I made the wrong choice in u and dv, and that's why my answer didn't come out right. Thanks.

Homework Helper
Guillochon said:
dark_omen, that answer is not correct.

Here's my solution:

u = x
dv = cos x dx

So:
du = dx
v = sin x

uv - I(v * du) = x sin x - I(sin x dx) = x sin x + cos x.

I've verified this answer in Mathematica as well.
:grumpy: :grumpy: :grumpy:
Why can't people just stop to give out COMPLETE solutions?!?!?!
???
Why?!?!?!   What's so tempting about posting complete solutions like that?
And also, where has the Constant of Integration gone? Vanished?

Last edited:
Homework Helper
Gold Member
Dearly Missed
Well, I find it excusable in that OP had shown quite a bit of work already.

Quaoar
VietDao29 said:
:grumpy: :grumpy: :grumpy:
Why can't people just stop to give out COMPLETE solutions?!?!?!
???
Why?!?!?!   What's so tempting about posting complete solutions like that?