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.
Best Answer
The equation is linear, so with $\sin x$ a solution, also $C\sin x$ is a solution.
The equation is autonomous, thus invariant under time shifts. So also $C\sin(x+D)$ is a solution. This is especially true for $D=\frac\pi2$, so that also $C\cos x$ are solutions
By linearity, also $C_1\cos x+C_2\sin x$ are solutions. Note that these can also be expressed as the previous form $C\sin(x+D)$.
By a dimension argument about order and independent parameters in a general solution of a linear DE, these are all possible solutions.