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.