Application of Legendre orthogonal polynomial method in calculating reflection and transmission coefficients of multilayer plates