∫cosx.ex.x2dx
Let u=x2⇒du=2xdx and dv=excosx⇒v=∫excosxdx
Using the above we have,
∫cosx.ex.x2dx=x2∫excosxdx−excosx∫2xdx
=x2∫excosxdx−excosx2×x22+c
=x2∫excosxdx−exx2cosx+c where c is the constant of integration. ..........(1)
Let I=∫excosxdx
Let u=ex⇒du=exdx and dv=cosxdx⇒v=sinx
⇒I=exsinx−∫exsinxdx .......(2)
Consider ∫exsinxdx
Let u=ex⇒du=exdx and dv=sinxdx⇒v=−cosx
⇒I=exsinx−[−excosx−∫−excosxdx]
⇒I=exsinx+excosx−∫excosxdx
⇒I=ex(sinx+cosx)−I where I=∫excosxdx
⇒2I=ex(sinx+cosx)
⇒I=ex(sinx+cosx)2 ....(3)
Substituting (3) in (1) we get
∫cosx.ex.x2dx=x2∫excosxdx−exx2cosx+c
=x2I−exx2cosx+c
=x2(ex(sinx+cosx)2)−exx2cosx+c
=exx22sinx+exx2cosx(12−1)+c
=exx22sinx−exx22cosx+c
=exx22(sinx−cosx)+c where c is the constant of integration
∴∫cosx.ex.x2dx=ex.x22(sinx−cosx)+c