# Math Help - trig integral

1. ## trig integral

I tried to solve this integral but i was not able to get an answer. I tried foiling the integrand and go from there but was not able to succeed.

Find integral

integral from 0 to pi (xsinx+cosx)(xcosx+sinx)dx

THey gave me a hint
Hint: sinxcosx= 1/2sin2x

So far i just foiled and got the following for the integrand:

x^2sinxcosx + xsin^2x+ xcos^2x + cosxsinx dx

2. Originally Posted by swimmergirl
I tried to solve this integral but i was not able to get an answer. I tried foiling the integrand and go from there but was not able to succeed.

Find integral

integral from 0 to pi (xsinx+cosx)(xcosx+sinx)dx

THey gave me a hint
Hint: sinxcosx= 1/2sin2x

So far i just foiled and got the following for the integrand:

x^2sinxcosx + xsin^2x+ xcos^2x + cosxsinx dx
Remember that $\sin^2{x} + \cos^2{x} = 1$.

So $x\sin^2{x} + x\cos^2{x} = x(\sin^2{x} + \cos^2{x}) = x(1) = x$.

Also $\sin{x}\cos{x} = \frac{1}{2}\sin{2x}$.

Thus the integrand is

$x^2\sin{2x} + x + \frac{1}{2}\sin{2x}$.

This is easier to integrate. You integrate the $x^2\sin{2x}$ using Integration by Parts.

3. oh ok it makes so much sense. Now, when I substitute 1/2 sin2x into x^2sinxcosx I don't get x^2sin2x...I get x^2 times 1/2 sin2x
what is wrong with it? i cant see my mistake

ok i think i got it. I took out the constant 1/2 and then integration by parts for x^2sin2x