Integration of Rational functions