We have
(D2 – D – 4)y = x + cos2x
A.E. is
m2 – m – 4 = 0


We assume for P.I. in the form
yp = a + bx + c cos 2x + d sin 2x ...(1)
Since 0, ± i are not roots of the A.E.
We have to find a, b, c and d such that
y"p – y′ p – 4yp = x + cos 2x ...(2)
From Eqn. (1)
y′ p = b – 2c sin 2x + 2d cos 2x
y"p = –4c cos 2x – 4d sin 2x
Now Eqn. (2) becomes,
– 4c cos2x – 4dsin2x – (b – 2csin2x + 2dcos2x) – [4 (a + bx + c cos2x + d sin2x)]
= x + cos2x
Comparing the coefficients, we have
– 4a – b = 0, – 4b = 1 and
– 8c – 2d = 1, 2c – 8d = 0
Solving these we get,
