An orthogonal system of rational functions is introduced. Some results on rational approximations based on various orthogonal projections and interpolations are established. These results form the mathematical foundation of the related spectral method and pseudospectral method for solving differential equations on the half line. The error estimates of the rational spectral method and rational pseudospectral method for two model problems are established. The numerical results agree well with the theoretical estimates and demonstrate the effectiveness of this approach.