Second order ODE

Why does the Time-Independent Schrodinger Equation, which is the second order ODE $$\left[-\frac{\hbar^2}{2m}\frac{d^2}{dx^2}+V(x)\right]\psi(x) = E\psi(x),$$ can have an infinite number of eigenvalues, hence also corresponding to an infinite number of eigenfunctions?

I thought there could be at most two eigenfunctions and two eigenvalues for a second order ODE.

-
The equation $\phi''=\lambda \phi$ already has infinitly many eigevalues... (To be precise, the operator $\phi\mapsto\phi''$ does) – Mariano Suárez-Alvarez Oct 17 '11 at 7:13
@MarianoSuárez-Alvarez: Thanks. I vaguely remember there to be some quantity of which an n-th order ODE has n of. What might it be? Is it the boundary conditions required or something else? Perhaps linearly independent solutions? – bugged Oct 17 '11 at 7:37
There can only be $n$ linearly independent solutions to an $n$-th order linear homogeneous order ODE. Also, any $n$-th order ODE needs $n$ boundary conditions in order to determine a unique solution. – anon Oct 17 '11 at 7:41
@anon: Is is not $n-1$ conditions for a $n^{\text{th}}$ order equation. – night owl Oct 17 '11 at 7:46
@night owl: No, it is not. (Think $n=1$ for a basic example.) @$\text{}$bugged: The key to understanding this is that $\lambda$ isn't just one fixed parameter, so e.g. $-\psi''+\lambda\psi=0$ isn't just one equation. Every solution to an equation among the family of DEs (i.e. every eigenfunction to the $-D^2$ operator) will of course only correspond to one eigenvalue. In the context of the wave equation that means there are an infinite number of energy levels $E$ for which the given form of DE is solvable with certain initial or boundary conditions. – anon Oct 17 '11 at 8:17

The key to understanding this issue is that $\lambda$ is not a fixed parameter, so $-\phi''+\lambda\phi=0$ for example isn't just a single equation: it's an entire family of them. There are initial or boundary conditions imposed, in which case there are infinitely many $\lambda$ for which this form of differential equation has a solution. For any such eigenvalue $\lambda$, the solution is unique (up to rescaling), so there is exactly one eigenvalue associated to each eigenfunction. In the context of quantum mechanics this means there are an infinite number of allowable energy levels. Furthermore, the fact that the spectrum, or set of eigenvalues, of the operator is discrete (countably infinite with no limit points IIRC) means that the energy levels are quantized, as we should expect in quantum mechanics.