How do you integrate #int e^x sin ^2 x dx # using integration by parts?

1 Answer
Oct 10, 2017

The answer is #=e^x/2-1/10e^xcos2x-1/5e^xsin2x+C#

Explanation:

We need

#cos2x=1-2sin^2x#, #=>#, #sin^2x=(1-cos2x)/2#

Therefore,

#I=inte^xsin^2xdx=int(e^x(1-cos2x)dx)/2#

Now, perform the integration by parts

#u=1-cos2x#, #=>#, #u'=2sin2x#

#v'=e^x#, #=>#, #v=e^x#

Therefore,

#I=1/2(e^x(1-cos2x)-inte^x2sin2xdx)#

#=e^x/2(1-cos2x)-inte^xsin2xdx#

Perform the integration by parts a second time

#u=sin2x#, #=>#, #u'=2cos2x#

#v'=e^x#, #=>#, #v=e^x#

#I=1/2inte^xdx-1/2inte^xcos2x=e^x/2(1-cos2x)-e^xsin2x+2inte^xcos2x#

Therefore,

#5/2inte^xcos2x=e^x/2-e^x/2+1/2e^xcos2x+e^xsin2x#

#inte^xcos2x=2/5(e^x/2-e^x/2+1/2e^xcos2x+e^xsin2x)#

#=2/5(e^x)(1/2cos2x+sin2x)#

#inte^x(cos2x)=int(e^x)(1-2sin^2x)dx=e^x-2inte^xsin^2xdx#

So,

#e^x-2inte^xsin^2xdx=2/5(e^x)(1/2cos2x+sin2x)#

#inte^xsin^2xdx=e^x/2-1/10e^xcos2x-1/5e^xsin2x+C#