Let I=∫x2(xsinx+cosx)2dx
=∫(xsecx)(xcosx(xsinx+cosx)2)dx
Using the rule of integration by parts, we get
ddx(1xsinx+cosx)
=−1(xsinx+cosx)2ddx(xsinx+cosx)
=−1(xsinx+cosx)2(xcosx+sinx−sinx)
=−1(xsinx+cosx)2(xcosx)
=−xcosx(xsinx+cosx)2
∫xcosx(xsinx+cosx)2dx=−1xsinx+cosx ..........(1)
Also,ddx(xsecx)=xsecxtanx+secx
=x×1cosx×sinxcosx+1cosx
⇒ddx(xsecx)=xsinx+cosxcos2x .........(2)
Now, in integration by parts, we take,
u=xsecx and dv=xcosx(xsinx+cosx)2
∴du=xsinx+cosxcos2x and v=−1xsinx+cosx
∴I=(xsecx)(−1xsinx+cosx)−∫xsinx+cosxcos2x×−1xsinx+cosxdx
=−xcosx(xsinx+cosx)+∫sec2xdx
=−xcosx(xsinx+cosx)+tanx
=−xcosx(xsinx+cosx)+sinxcosx
=−x+sinx(xsinx+cosx)cosx(xsinx+cosx)
=−x+xsin2x+sinxcosxcosx(xsinx+cosx)
=−x(1−sin2x+sinxcosx)cosx(xsinx+cosx)
=−xcos2x+xsinxcosxcosx(xsinx+cosx)
=cosx(−xcosx+xsinx)cosx(xsinx+cosx)
=(−xcosx+xsinx)(xsinx+cosx)+c
∴I=(−xcosx+xsinx)(xsinx+cosx)+c