Here A.E. is
m2 + 1 = 0 and its roots are m = ± i
Hence C.F. = C1cos x + C2 sin x
Note that sin x is common in the C.F. and the R.H.*. of the given equation. (± i is the root of the A.E.)
Therefore P.I. is y the form
yp = x (a cos x + b sin x) ...(1)
Since ± i is root of the A.E.
We have to find a and b such that
y"p + yp = sin x ...(2)
From Eqn. (1) y′p = x (– a sinx + bcosx) + (acosx + bsinx)
y"p = x (– a cos x – bsin x) + (– asinx + bcosx) – asinx + bcosx
= x (– acosx – bsinx) – 2asinx + 2bcosx
Then the given equation reduces to using the Eqn. (1)
x (– a cos x – b sinx) – 2a sin x + 2b cos x + x (a cos x + b sin x) = sin x
Equating the coefficients, we get
i.e., – 2a sin x + 2b cos x = sin x