Numerical solution of eighth-order boundary value problems by using Legendre polynomials