How do you integrate #x^2(sinx)dx#?

1 Answer
Jul 26, 2016

#intx^2sin(x)dx=-x^2cos(x)+2xsin(x)+2cos(x)+C#

Explanation:

Use integration by parts, which takes the form:

#intudv=uv-intvdu#

For #intudv=intx^2sin(x)dx#, we let:

#u=x^2" "=>" "(du)/dx=2x" "=>" "du=2xdx#

#dv=sin(x)dx" "=>" "intdv=intsin(x)dx" "=>" "v=-cos(x)#

Thus, substituting these into the integration by parts formula, we see that:

#intx^2sin(x)dx=-x^2cos(x)-int(-2xcos(x))dx#

Simplifying the negative signs:

#intx^2sin(x)dx=-x^2cos(x)+2intxcos(x)dx#

Now, do integration by parts once more on the remaining integral:

#u=x" "=>" "(du)/dx=1" "=>" "du=dx#

#dv=cos(x)dx" "=>" "intdv=intcos(x)dx" "=>" "v=sin(x)#

Thus:

#intxcos(x)dx=xsin(x)-intsin(x)dx#

Since #intsin(x)dx=-cos(x)#, this becomes:

#intxcos(x)dx=xsin(x)+cos(x)#

Now, returning to before:

#intx^2sin(x)dx=-x^2cos(x)+2intxcos(x)dx#

Substitute in #intxcos(x)dx=xsin(x)+cos(x)#:

#intx^2sin(x)dx=-x^2cos(x)+2(xsin(x)+cos(x))#

#intx^2sin(x)dx=-x^2cos(x)+2xsin(x)+2cos(x)+C#