Use the drift-removing substitution for a Dirichlet Sturm-Liouville problem, . Direct differentiation gives . The homogeneous boundary conditions become , so the eigenvalues and eigenfunctions are
The self-adjoint weighted form is
Thus the weight and leading coefficient are both . The orthogonality of Sturm-Liouville eigenfunctions reads
After multiplying the forcing equation by , it becomes . Expanding in the sine series of part (i) and dividing by gives
Every term satisfies the endpoint conditions. As a check, solving the transformed ODE directly gives , which has the same coefficients and forcing.
For the real coefficients of the stated self-adjoint Sturm-Liouville problem, define the weighted inner product
Since , a nonzero eigenfunction has positive squared norm. Let . Integration by parts and the Dirichlet boundary conditions give
Taking to be an eigenfunction shows that its eigenvalue is real, since is real. For two eigenfunctions with eigenvalues , the same identity gives
Hence distinct eigenvalues imply orthogonality in the weighted inner product. This is the orthogonality of Sturm-Liouville eigenfunctions. The calculation assumes the regularity needed for the stated self-adjoint boundary problem, so all boundary terms and integrals are defined.