We need
cos2x=1-2sin^2xcos2x=1−2sin2x, =>⇒, sin^2x=(1-cos2x)/2sin2x=1−cos2x2
Therefore,
I=inte^xsin^2xdx=int(e^x(1-cos2x)dx)/2I=∫exsin2xdx=∫ex(1−cos2x)dx2
Now, perform the integration by parts
u=1-cos2xu=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