How do you integrate #int x^2sinx# by integration by parts method?

1 Answer
Oct 27, 2016

# intx^2sinx dx = 2cosx + 2 xsinx -x^2cos x+ C#

Explanation:

The formula for integration by parts is:
# intu(dv)/dxdx = uv - intv(du)/dxdx #

Essentially we would like to find one function that simplifies when differentiated, and one that simplifies when integrated (or is at least integrable).

In this case a trig function stays as a trig function but #x^2# simplifies if differentiated.

Let # {(u=x^2, => ,(du)/dx=2x),((dv)/dx=sinx,=>,v =-cosx ):}#

So IBP gives:

# int(x^2)(sinx)dx = (x^2)(-cos x)-int(-cosx)(2x)dx#
# :. intx^2sinx dx = -x^2cos x + 2intxcosxdx# ..... [1]

Ok, well that is better, but for the second interval we have to use IBP again;

Let # {(u=x, => ,(du)/dx=1),((dv)/dx=cosx,=>,v =sinx ):}#

So IBP gives:

# int (x)(cosx)dx = (x)(sinx) - int (sinx)(1)dx #
# :. int xcosxdx = xsinx - int sinxdx #
# :. int xcosxdx = xsinx + cosx # ..... [2]

Substituting [2] into [1] we have;

# intx^2sinx dx = -x^2cos x + 2{ xsinx + cosx} + C#
# :. intx^2sinx dx = -x^2cos x + 2 xsinx + 2cosx + C#
# :. intx^2sinx dx = 2cosx + 2 xsinx -x^2cos x+ C#