Let I=∫sin x(cos2 x+1)(cos2 x+4)dx
Put cos x=t⇒sin xdx=−dt so, I=∫−dt(t2+1)(t2+4)
Consider −1(t2+1)(t2+4)=−1(1+y)(4+y)=A1+y+B4+y where y=t2
⇒−1=A(4+y)+B(1+y) ∴A=−13, B=13
Therefore, I=∫13[1t2+4−1t2+1]dt ⇒I=13[12tan−1t2−tan−1t]+C
∴I=16tan−1(cos x2)−13tan−1 (cos x)+C.