I am trying to solve the following question in my homework:
Use the method of undetermined coefficients to solve the following differential equation: $$y'' + y = -\sin(x), \ y(0) = 0, \ y'(0) = 0.$$
I feel that I have a fairly good grasp of the concepts, that I need to find a general solution of the homogeneous equation and then a particular solution. Then I need to solve for the constants $c_1$ and $c_2$ by plugging in the initial conditions. However, my answer is not being accepted by the computer program my teachers use. Here is my answer: $$ y = -0.5\sin(x) + 0.5x\cos(x). $$ I have checked this answer several times by finding its first and second derivatives, plugging both into the original DE, and also plugging in the initial conditions. I am wondering if there is a typo, since my teachers create our homework online. Is anyone getting the same answer? I want to know if I need to approach my teachers and tell them that there is a possible typo in the homework. Thank you!