1. ## Integrate this!

Can you please show me how to do this...

$
\int_{0}^{pie}{x}^2sin{x}\,\,\,dx
$

thanks.

2. Originally Posted by Unt0t
Can you please show me how to do this...

$
\int_{0}^{pie}{x}^2sin{x}\,\,\,dx
$

thanks.
Apply integration by parts. Twice.

3. does it end up being

$
{x}^2*-cos{x}-\int2{x}*-cos{x}
$

then

$
{x}^2*-cos{x}+2{x}sin{x}-\int 2sin{x}
$

then

$
{x}^2*-cos{x}+2{x}sin{x}+2cos{x}
$

i'm so confused...

4. This calls for integration by parts. In general, if you have an integral: $\int u\,\,\,dv$, where both $u$ and $dv$ are functions of $x$, the integral can be rewritten as:

$uv - \int v\,\,\,du$

Usually, you want to pick a $u$ that is easy to differentiate and can usually differentiate down to 0. In this case, let's pick $x^{2}$ as $u$. Differentiating, we get $du=2x\,\,\,dx$. When we let $dv=sinxdx$, we can integrate that to get $v=-cosx$. Having these, we can simply rewrite the original integral as:

$-x^{2}cosx + 2\int xcosx\,\,\,dx$

Notice how the integral there cannot be easily integrated, so for that integral we need to do integration by parts a second time. Same rules apply; make your $u$ easy to differentiate. Let's pick $x$ as $u$. Differentiating, we get $du=dx$. Picking $cosxdx$ as your $dv$, when we integrate we will get $v=sinx$. We can therefore rewrite the previous expression as:

$-x^{2}cosx + 2xsinx - 2\int sinx\,\,\,dx$

The final integral is simply $-cosx$, we just simply write:

$-x^{2}cosx + 2xsinx + 2cosx$. I'll leave it up to you to evaluate the integral from $0$ to $\pi$.

5. can I ask where you go the 2 in front of $\int sinx\,\,\,dx$

$

-x^{2}cosx + 2xsinx - 2\int sinx\,\,\,dx

$

6. Notice how there was a 2 in front of the integral $\int xcosx\,\,\,dx$. That 2 is distributed to both the $xsinx$ and $\int sinx\,\,\,dx$ terms that resulted from the second time integrating by parts.

Originally Posted by Unt0t
does it end up being

$
{x}^2*-cos{x}-\int2{x}*-cos{x}
$

then

$
{x}^2*-cos{x}+2{x}sin{x}-\int 2sin{x}
$

then

$
{x}^2*-cos{x}+2{x}sin{x}+2cos{x}
$

i'm so confused...
You have the 2 in your evaluation right here. Same 2 as in mine.

7. thanks heaps