Rational Krylov methods and approximation of f (A)b