How do you find the antiderivative of #int (xsin^2x) dx#?

1 Answer
Jan 16, 2017

#int(xsin^2x)dx=1/4x^2-1/4xsin(2x)-1/8cos(2x)+C#

Explanation:

It's often very advantageous to rewrite #sin^2x# in integrals using the identity #cos(2x)=1-2sin^2x#. Solving for #sin^2x# in this shows that #sin^2x=1/2(1-cos(2x))#. Thus:

#intxsin^2xdx=int1/2x(1-cos(2x))dx#

Expanding:

#=1/2intxdx-1/2intxcos(2x)dx#

The first integral is basic:

#=1/2x^2/2-1/2intxcos(2x)dx#

#=1/4x^2-1/2intxcos(2x)dx#

Now performing integration by parts:

#{(u=x" "=>" "du=dx),(dv=cos(2x)" "=>" "v=1/2sin(2x)):}#

Note that going from #dv# to #v# requires a substitution of its own.

Then the integral equals:

#=1/4x^2-1/2(uv-intvdu)#

#=1/4x^2-1/2(1/2xsin(2x)-int1/2sin(2x)dx)#

#=1/4x^2-1/4xsin(2x)+1/4intsin(2x)dx#

Note that #intsin(2x)dx=-1/2cos(2x)#:

#=1/4x^2-1/4xsin(2x)-1/8cos(2x)+C#