y'' + y = -sin(x) $y'' + y = -\sin(x)$
$y(0) = 0 $
$y'(0) = 0$
I first solved for the homogeneous solution to get:
$y(x) = c_1 \sin(x) + c_2 \cos(x)$
then took the derivative of that:
$y'(x) = c_1 \cos (x) - c_2 \sin(x)$
This is where I am not sure where to go...
$y(0) = c_1 \sin(0) + c_2 \cos(0) 
     =  0 + c_2 $
so would c2 equal zero?
y'(0) = c1 cos(0) - c2 sin(0)
      =  c1 - 0
then c2 is zero too?
I don't think that's right, but I'm not sure what else to do. 
And where to go from there. 
 A: We must use the initial values for the general solution
$$y=c_1\sin x+c_2\cos x+y_p$$
the particular solution is
$$y_p=Ax\sin x+Bx\cos x$$
$$A=0,B=\frac{1}{2}$$
so the general solution is
$$y=c_1\sin x+c_2\cos x+\frac{x}{2}\cos x$$
now you can use the initial values to find the $A$ and $B$
A: $y'' + y = -\sin x$
solve the homogeneous equation
$y = c_1  \sin t + c_2 \cos x + y_p$
Undetermined coefficients.
$y = A x\sin x + Bx\cos x$
Why $A x \sin x + B x\cos x,$ and not the more simple-minded $A \sin x + B \cos x$?  
$A \sin x + B \cos x$ is already part of the homogeneous solution.  So, when we plug it into the diff eq, it is going to "go away."  We need something that when differentiated (twice) has a part that equals $-\sin x$ but is not in the homogeneous solution.
$y' = A\sin x + B\cos x - B x\sin x + Ax\cos x\\
y'' = -2B \sin x + 2A\cos x - A x\sin x + Bx\cos x\\ 
y''+y = -2B \sin x + 2A\cos x = -\sin x\\
B = \frac 12, A = 0$
$y = c_1  \sin t + c_2 \cos x + \frac 12 x \cos x\\
y(0) = C_2 = 0\\
y'(0) = C_1 = 0$
$y = \frac 12  x\cos x$
