# Definite integration by parts

• paperclip
In summary, the student attempted to solve a problem involving integrals, but made a mistake in the second step of the problem. They were able to correct the mistake and solve the problem correctly.

#### paperclip

Hello there. I feel like this isn't the right answer, but I'd like some verification as to where exactly I went wrong! 1. Homework Statement is $$\int_{0}^{pi}x^2cos x dx$$

3. The Attempt at a Solution went something like this:
$$u=x^2 dv=cos x dx du=2x dx v=\int_{0}^{pi}cos x dx= sin x$$

The integral was then:
$$\int_{0)^{pi}x^2cos x dx= x^2 sin x\right]_{0}^{pi}-\int_{0}^{pi}sin x 2x dx$$

to solve:

$$=x^2 sin x + cos x x^2$$
$$=pi^2 sin pi + cos 0 o^2$$
$$9.87 times 0=1+0$$
$$=1$$

Thanks for all your help in advance! Last edited:
paperclip said:
Hello there. I feel like this isn't the right answer, but I'd like some verification as to where exactly I went wrong! 1. Homework Statement is $$\int_{0}^{pi}x^2cos x dx$$

3. The Attempt at a Solution went something like this:
$$u=x^2 \hspace{5mm} dv=cos x dx \hspace{5mm} du=2x dx \hspace{5mm} v=\int_{0}^{pi}cos x dx= sin x$$

The integral was then:
$$\int_{0}^{pi}x^2cos x dx= \left[x^2 sin x\right]_{0}^{\pi}-\int_{0}^{\pi}sin x 2x dx$$

to solve:

$$=x^2 sin x + cos x x^2$$
$$=\pi^2 sin pi + cos 0 o^2$$
$$9.87 \times 0=1+0$$
$$=1$$

Thanks for all your help in advance! Ive just cleaned up your tex so I can check your work.

From here: $$\int_{0}^{\pi}x^2cos x dx= \left[x^2 sin x\right]_{0}^{\pi}-\int_{0}^{\pi}sin x 2x dx$$

You need to apply integration by parts again to the second term on the RHS. I don't quite know what you've done in your original post.

You started just fine:

$$\int x^2 \cos x\,dx = x^2\sin x - \int \sin x\,2x\,dx$$

You're problem is the second integration:

$$\int \sin x\,2x\,dx \ne -\cos x\,x^2$$

Do I need to integrate by parts again?
$$\int \sin x\,2x,dx=2/int,x,sinx,dx$$
so
$$= \left[x^2 sin x\right]_{0}^{\pi}-2\int_{0}^{\pi}xsin x dx$$
is this right?

No :(

$$\int \sin x 2x dx$$.
u=sin x, dv = 2x dx
du=cos x dx, v=x^2

Subbing these straight into integration by parts it should be
$$\sin (x) \cdot x^2 - \int x^2 \cos x dx$$.

Hmm Isnt that interesting, your original integral appeared again, how could this help i wonder :P

Actually I did it wrong, you should be able to see why the way I did it doesn't help.

instead, in integration by parts, let u=2x and dv= sin x dx
that way, du= 2 dx, and v= -cos x, which gives us
$$-2x\cos x + 2\int \cos x dx$$.
The integral in that is just 2 sin x, so the solution to your original integral is easy from here.