Where D is the differential operator #d/(dx)#, this can be written as
#(D^3+2D^2+2D) y = -4x^2 + 2#
And factors as:
#D (D + 1 - i) (D+ 1 + i) y = -4x^2 + 2#
For the null solutions:
#Dy = 0 implies y = c_1#
#(D + 1 - i) y = 0 implies y = c_2 e^((- 1 + i)x)#
#(D + 1 + i) y = 0 implies y = c_3 e^((- 1 - i)x)#
Superimpose these to obtain the full complementary solution:
#y = c_1 + c_2 e^((- 1 + i)x) + c_3 e^((- 1 - i)x)#
#= c_1 + e^(-x) ( c_2 e^( i x) + c_3 e^(- i x))#
#= c_1 + e^(-x) ( c_4 cos x + c_5 sin x)#, bearing in mind that the constants can be complex.
For the particular solution, because there is no #y# term on the LHS, start with trial polynomial:
#y = A x^3 + B x^2 + C x #
#D y = 3 A x^2 + 2 B x + C#
#D^2 y = 6 A x + 2 B#
#D^3 y = 6 A #
Comparing like terms:
#6A = - 4#
#12 A + 4 B = 0#
#6A + 4B + 2C = 2#
#implies A,B,C = - 2/3, 2, -1#
Superimposing all solutions:
#y = A + e^(-x) ( B cos x + C sin x) - 2/3 x^3 + 2 x^2 - x #