Orthogonal polynomials and differential equations in neutron-transport and radiative-transfer theories