Spectral methods using rational basis functions on an infinite interval