rational part of antiderivative






Is there a Maxima function that returns *just* the rational
function part of the antiderivative of a rational function?
For example, I'd like a function that does

   rational-part-of-antiderivative(1 + 1/x - 1/x^2,x) --> x + 1/x

Yes, I could write this function from scratch, but maybe Maxima
already has such a function?

Barton