Let us act intentionally stupid and assume we do not know that we can solve for the spectrum of the harmonic oscillator 


$$-\frac{d^2}{dx^2}+x^2$$


explicitly.


Is there an abstract argument why the spectrum of this operator is discrete and tends to infinity?


It almost looks like a result that would follow from the compactness of some operator involved, yet we are here on an unbounded domain $\mathbb{R}.$


So does it follow from spectral theory only that the spectrum is discrete?



Harmonic oscillator discrete spectrum
As already pointed out in the comments, $V\to\infty$ does imply discrete spectrum in general. In fact, this becomes an equivalence if a somewhat more general version of this condition is used:



> 
> Theorem: Suppose that $V(x)$, $x\ge 0$, is bounded below (and locally integrable, as usual). Then the spectrum of $-d^2/dx^2+V(x)$ on $L^2(0,\infty)$ (with arbitrary boundary condition at $x=0$) is purely discrete if and only if $\lim\_{x\to\infty} \int\_x^{x+d} V(t)\, dt = \infty$ for all $d>0$.
> 
> 
> 


This is usually called the *Molchanov criterion*, you can try a search for this if you want more information.


I've formulated this for half line problems, but by the decomposition method $\sigma\_{ess}(H)=\sigma\_{ess}(H\_-)\cup\sigma\_{ess}(H\_+)$ you also get a corresponding result about whole line problems.


**Addendum:** A few words on the proof perhaps, especially since "compact resolvent" has been mentioned a few times already as a possible method. This is an indeed an obvious approach and there's nothing wrong with it, but my personal preference here in one dimension would be to use oscillation theory. More precisely, $\sigma\_{ess}=\emptyset$ is equivalent to the claim that any non-trivial solution $y$ of $-y''+Vy=Ey$ has only finitely many zeros for any $E\in\mathbb R$ (the number of zeros counts the number of eigenvalues below $E$, give or take one).


Now it's fairly straightforward to show, using Prufer variables, that this is indeed equivalent to $\lim\int\_x^{x+d}V\, dt=\infty$.


