Dimension of solution space The dimension of the solution set of the differential equation $y''+y=0$ is?
Solution to the DE is $y=a\cos x+b\sin x$. So $\cos x$ being a polynomial of even powers and $\sin x$ being of odd powers so together they form a polynomial of infinite order so the dimension of the solution space is $\infty$?
 A: +1 Very nice question!
I think your confusion comes from the fact that you mix two concepts. First, there is the concept of a solution (which is a linear combination of $\cos(x)$ and $\sin(x)$ and the second concept is the representation of the solution.
You are right that $\cos(x)=1-x^2/2\pm \ldots$, but the terms are not solutions to the ODE, e.g. $1$ or $x^2/2$ do not solve the ODE. Only the infinite sum solves the ODE.
You could argue that $\cos(x)=\frac{e^{ix}+e^{-ix}}{2}$ and $\sin(x)=\frac{e^{ix}-e^{-ix}}{2i}$. Clearly in this finite expressions both terms solve the ODE, but be aware that they are linearly independent. So, even in this representation we see that there are only two independent solutions $e^{ix}$ and $e^{-ix}$.
A: The solution space is $2$-dimensional since it is a linear ODE with constant coefficients. To see this, look at the ansatz $e^{\lambda x}$ which yields the characteristic polynomial $$\lambda^2 + 1 = 0$$ The basis for the solution space has now the form $$y(x) = \alpha e^{\lambda_1x} + \beta e^{\lambda_2 x}$$ where $\lambda_1$ and $\lambda_2$ are the roots of above polynomial. A more proper treating of this fact can be done using a system of the form $$y'(x) = Ay(x)$$ where $A$ is a square matrix with constant coefficients.
A: The space of the solutions is
$$
S:=\{\lambda\cos(x)+\mu\sin x: (\lambda,\mu)\in\mathbb{R}^2\}
$$
which is a $2$-dimensional vector space. You can see it from its definition.
