Final answer:
To solve the given differential equation by undetermined coefficients, we first solve the homogeneous equation, find a particular solution, and then combine the two to obtain the general solution.
Step-by-step explanation:
To solve the given differential equation by undetermined coefficients, we first solve the homogeneous equation by finding its characteristic equation: r^2 + 2r + 1 = 0. The roots of this equation are r = -1, -1. Therefore, the general solution to the homogeneous equation is y_h(x) = c1e^(-x) + c2xe^(-x).
Next, we find a particular solution to the non-homogeneous equation by assuming the form y_p(x) = Asinx + Bcosx + Ccos2x + Dsin2x, where A, B, C, and D are coefficients to be determined. Plugging this form into the equation and solving for the coefficients, we find that A = 0, B = -1/4, C = 4, and D = 0.
Finally, the general solution to the given differential equation is y(x) = y_h(x) + y_p(x). Substituting the values for c1, c2, A, B, C, and D, we obtain the final solution.