Orthogonality conditions in Legendre functions and solved problems