add rational function