I=∫x2exsinxdx
Integrating by parts u=x2.V=exsinx
u1=2x,∫vdx=12ex(sinx−cosx) [Integrated by parts]
I=x2∫exsindx−∫2x(∫exsinxdx)dx
=x2ex2(sinx−cosx)−∫xex(sinx−cosx)dx
Now, ∫ex(cosx−sinx)dx=excosx[∵∫exf(x)+f′(x)dx=exf(x)]
I=x2ex2(sinx−cosx)+[xexcosx−∫(1)excosxdx] [Using by parts]
=x2ex2(sinx−cosx)+xexcosx−ex2(sinx+cosx)+C [Using by parts]
=ex2[sin(x)(x2−1)+cosx(−x2+2x−1)]+C
I=ex2((x2−1)sinx−(x−1)2cosx)+C