It is given that
∫x2 cos x dx
We can write it as
By integrating w.r.t x
= x2 sin x – ∫2x sin x dx
So we get
= x2 sin x – 2 [∫ x sin x dx]
Now apply by the part method
= x2 sin x – 2 ∫ x sin x dx
Again by integration
We get
= x2 sin x – 2 [x (- cos x) – ∫ 1. (- cos x) dx]
By integrating w.r.t x
= x2 sin x – 2(- x cos x + sin x) + c
On further simplification
= x2 sin x + 2x cos x – 2 sin x + c