Given g(x) = (ax2 + bx + c)sinx + (dx2 + ex + f) cos x
⇒ g'(x) = (2ax + b)sinx + (ax2 + bx + c)cos x + (2dx + e)cos x – (dx2 + ex + f)sinx
= (2ax + b – dx2 – ex – f)sinx + (2 + bx + c + 2 + e)cos x
Comparing the co-efficients of sin x and cos x, we
get, (2ax + b – dx2 – ex – f) = x2
and (ax2 + bx + c + 2dx + e) = 0