d^2y/dx^2 - y = 2x
The auxiliary eqn is
m^2 - 1 = 0
m = +/- 1
The homogeneous solution is,
y1 = Ae^x + Be^(-x)
Let the 2md solution be,
y2 = Cx + D
By inspection, we can see thast C = -2, D =0. Hence
y2 = -2x
The general solution is y(x) = y1 + y2
Answer: y(x) = Ae^x + Be^(-x) - 2x