= Solution
Multiply the equation for $y_n$ by $y_m$ and the equation for $y_m$ by $y_n$, then subtract. The common $h$ terms cancel, and <integration by parts> gives the <Lagrange identity for a Sturm-Liouville operator>:
$$
(\lambda_n-\lambda_m)\int_a^bw y_ny_m\,dx=\left[g(y_ny_m'-y_my_n')\right]_a^b.
$$
At each endpoint the two pairs $(y_n',y_n)$ and $(y_m',y_m)$ satisfy the same nontrivial homogeneous linear equation. They therefore lie on the same one-dimensional line, and their determinant vanishes. The boundary expression is zero. Since the <eigenvalues> are distinct, division gives the required <orthogonality of Sturm-Liouville eigenfunctions>:
$$
\boxed{\int_a^b w(x)y_n(x)y_m(x)\,dx=0.}
$$
For complex-valued eigenfunctions of a real self-adjoint problem one may choose real <eigenfunctions>, or use the conjugated version as a <weighted inner product>.
Back to article page