So the problem is

y''+y=cosx y(0)=1 y(0)=-1

The roots are r^2=-1 (+i,-i)

so that would give a homogeneious equation of

y=c1cosx +c2sinx

but how do i figure out the other equation that i need? is it just as simple as y=Acosx?

if i go that route, then

y'=-Asinx

y''=-Acosx.

plugging that into the original equation, i would get -Acosx+Acosx=cosx. cosx=0

that doesn't seem right at all. i'm confused on how to figure out how to pick the second equation.