I'm currently studying ODE's using the textbook Advanced Engineering Mathematics 10e (Kreyszig, 2019) and had a question regarding solving ODE's. In case anyone's wondering, this is exercise problem 6 on page 8.
Solve the ODE by integration or by remembering a differentiation formula.
$$y^{''} = -y$$
The solution that I got is $y = \sin(x) + C$, since to me it seemed obvious that if you differentiate $y = \sin(x)$ twice you get $-\sin{x}$, or $-y$. However, the solution that I've found here states that the solution is actually:
$$y = C_1\sin(x) + C_2\cos(x)$$
Perhaps this is due to the fact that my calculus background is relatively weak, but I'm having trouble understanding how I managed to get a solution that's drastically different from the correct one.
Would anybody be kind enough to help me understand this process? Thank you.