Hamiltonian Systems and Sturm–Liouville Equations: Darboux Transformation and Applications