1. help with this integral

integral of x sin^2x dx

and would you show me the proceedure please?

2. Originally Posted by yasu7
integral of x sin^2x dx

and would you show me the proceedure please?
Parts!

$\displaystyle \sin^2(x) = \frac{1}{2} - \frac{1}{2}\cos(2x)$

Hence

$\displaystyle \int x \sin^2(x) dx = \int x\bigg( \frac{1}{2} - \frac{1}{2}\cos(2x) \bigg)dx = \frac{1}{2}\int x - x \cos(2x) dx$

The first term is easily integrated, and the 2nd term is integrated by parts.

$\displaystyle \int x \cos(2x) dx = \bigg(\frac{x \sin(2x)}{2}\bigg) - \int \frac{\sin(2x)}{2}dx$

3. I've got the answer, and it is like this:
$\displaystyle 1/8(2x^2-2xsin2x-cos2x) + c$

could someone help me get to this?

4. Originally Posted by yasu7
I've got the answer, and it is like this:
$\displaystyle 1/8(2x^2-2xsin2x-cos2x) + c$

could someone help me get to this?
$\displaystyle \sin^2(x) = \frac{1}{2} - \frac{1}{2}\cos(2x)$

Hence the integral becomes:

$\displaystyle \int x \sin^2(x) dx = \int x\bigg( \frac{1}{2} - \frac{1}{2}\cos(2x) \bigg)dx = \frac{1}{2}\int x - x \cos(2x) dx$.

This can be split into two integrals as such:

$\displaystyle = \frac{1}{2}\int x dx - \frac{1}{2}\int x \cos(2x) dx$

The first integral can be calculated easily using the rule that $\displaystyle \int x^n dx = \frac{x^{n+1}}{n+1} +C$. The second integral must be evaluated by parts:

First Integral

$\displaystyle = \frac{1}{2}\bigg(\frac{x^2}{2}\bigg)$

Second Integral

$\displaystyle \frac{1}{2}\bigg(x \frac{\sin(2x)}{2}\bigg) - \frac{1}{2} \int \frac{\sin(2x)}{2}dx$

$\displaystyle = x \frac{\sin(2x)}{4} +\bigg(\frac{1}{2} \frac{\cos(2x)}{4}\bigg)dx$

$\displaystyle = x \frac{\sin(2x)}{4} +\frac{\cos(2x)}{8} +C$

Total Integral = First Integral - Second Integral

$\displaystyle = \frac{1}{2}\bigg(\frac{x^2}{2}\bigg) - \bigg(x \frac{\sin(2x)}{4} +\frac{\cos(2x)}{8} + C\bigg)$

$\displaystyle = \frac{x^2}{4} - x \frac{\sin(2x)}{4} - \frac{\cos(2x)}{8} + C$

Take out a factor of $\displaystyle \frac{1}{8}$

$\displaystyle = \frac{1}{8} \bigg(2x^2 - 2x\sin(2x) -cos(2x)\bigg) + C$

5. I don't get where does the $\displaystyle \frac{1}{2}\int\frac {sin(2x)}{2}$ comes from,

is that a rule or something? thanks in advance

6. Originally Posted by yasu7
I don't get where does the $\displaystyle \frac{1}{2}\int\frac {sin(2x)}{2}$ comes from,

is that a rule or something? thanks in advance
Yes, it's called integration by parts.

$\displaystyle \int f(x)g'(x) = g(x)f(x) - \int g(x)f'(x) dx$

In your case $\displaystyle f(x) = x$ and $\displaystyle g'(x) = \cos(2x)$

So $\displaystyle f'(x) = 1$ and $\displaystyle g(x) = \int g'(x)dx = \int(\cos(2x))dx = \frac{\sin(2x)}{2}$

Put it all together and you get:

$\displaystyle \int x \times \cos(2x) dx = \bigg(\frac{\sin(2x)}{2} \times x \bigg) - \int \bigg(\frac{\sin(2x)}{2} \times 1\bigg) dx$