Questions about the proof of the Sturm oscillation theorem I'm trying to understand the proof of the Sturm oscillation theorem and I hit the roadblock.
Theorem: Let $E_0<E_1<\dots$ be the eigenvalues of $H=-\frac{d^2}{dx^2}+V(x)$ on $L^2(0,a)$ with boundary conditions $u(0)=u(a)=0$. Then $u(x,E_n)$ has exactly $n$ zeros in $(0,a)$.
Part of the proof: 
Suppose $u_n$ has $m$ zeros $x_1<\dots<x_m$ in $(0,a)$. Let $v_0,\dots,v_m$ be the function $u_n$ restricted successively to $(0,x_1),(x_1,x_2),...,(x_m,a)$. The $v$'s are continuous and piecewise $C^1$ with $v_l(0)=v_l(a)=0$. Thus they lie in the quadratic form domain of $H$ and 
$$
<v_j,Hv_k>=\int_0^a v'_j v'_k + \int_0^a Vv_jv_k=\delta_{jk}E\int_0^a v_j^2dx
$$
since if $j=k$, we can integrate by parts and use $-u''+Vu=Eu$.
It follows that for any $v$ in the span of $v_j$'s, $<v,Hv>=E\|v\|^2$, so by the variational principle, $H$ has at least $m+1$ eigenvalues in $(-\infty, E_n]$, that is, $n+1\geq m+1$
Questions:


*

*Why is it possible to express $<v_j,Hv_k>$ as in the formula above and how the expression is integrated by parts?

*What is the variational principle mentioned above that allows to determine the number of eigenvalues in the interval $(-\infty, E_n]$?
 A: Question 1
By definition
$$
\newcommand{\ip}[2]{\left\langle#1,#2\right\rangle}
\ip{v_j}{Hv_k}
=
\int_0^a(-v_jv_k''+Vv_jv_k).
$$
The first term is in fact $\int_{x_j}^{x_{j+1}}-v_jv_k''$.
On this interval we integrate by parts as usual.
The boundary terms vanish because $v_j(x_j)=v_j(x_{j+1})=0$.
Since $v_j$ (and $v_j'$) is supported on this interval, it makes no difference to expand it to the whole $[0,1]$, so
$$
\ip{v_j}{Hv_k}
=
\int_0^a(v_j'v_k'+Vv_jv_k).
$$
This is the first equality.
The other equality is different.
The functions $v_j$ are supported on different intervals so $\ip{v_j}{Hv_k}$ has to be zero when $j\neq k$.
It then remains to calculate $\ip{v_k}{Hv_k}$.
This is nothing but $\int_{x_k}^{x_{k+1}}v_kHv_k$.
Now $Hv_k=E_nv_k$ on this interval.
This gives you
$$
\ip{v_j}{Hv_k}
=
E_n\delta_{jk}\int_{x_k}^{x_{k+1}}v_k^2.
$$
You can replace the integral with that from $0$ to $a$ since $v_k$ is zero outside the interval in the formula above.
So for the first equality, integrate by parts, and for the second, use the eigenfunction property.
Question 2
There are many variational principles out there, so I can only guess which one is meant here.
Consult the material you are using for an exact formulation.
My guess is this:
If there is an $M$-dimensional space of functions $v$ with $\ip{v}{Hv}=E\ip{v}{v}$, then $H$ has to have at least $M$ eigenvalues $\leq E$.
This applied to $M=m+1$ and $E=E_n$ gives the inequality in your proof.
Formatting comment
This is beside the point, but I can't help commenting.
Please do not use the less and greater than symbols (< and >) for the inner product.
They are designed to be binary relations, so their looks and spacing don't fit the use in inner products.
Instead, use the angle brackets \langle and \rangle.
