# Thread: Integrate this!

1. ## Integrate this!

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

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

thanks.

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

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

thanks.
Apply integration by parts. Twice.

3. does it end up being

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

then

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

then

$\displaystyle {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: $\displaystyle \int u\,\,\,dv$, where both $\displaystyle u$ and $\displaystyle dv$ are functions of $\displaystyle x$, the integral can be rewritten as:

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

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

$\displaystyle -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$\displaystyle u$ easy to differentiate. Let's pick $\displaystyle x$ as $\displaystyle u$. Differentiating, we get $\displaystyle du=dx$. Picking $\displaystyle cosxdx$ as your $\displaystyle dv$, when we integrate we will get $\displaystyle v=sinx$. We can therefore rewrite the previous expression as:

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

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

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

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

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

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

Originally Posted by Unt0t
does it end up being

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

then

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

then

$\displaystyle {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