c = 1;  d = (x^3) + x;

res = Resultant[c - z D[d, x], d, x]

sol = Solve[res == 0, z]

sol = Union[Solve[res == 0, z]]

zlist = z /. sol

vlist = PolynomialGCD[c - z D[d, x] /. sol, d]

makemonic[p_, x_] := 
      Module[{n}, 
n = 
          Exponent[p, x]; 
Expand[
          p/Coefficient[p, x, n]]
]

makemonic[vlist, x]

zlist  .  Log[makemonic[vlist, x]]

int = 
      (1/2) Log[(x^3) + x - 1] - (2/3) Log[(x^5) + 2  (x^2) - 3]

r = Together[D[int, x]]

c = Numerator[r]/6;  d = Denominator[r]/6;

res = Resultant[c - z D[d, x], d, x]

sol = Union[Solve[res == 0, z]]

zlist = z /. sol

vlist = PolynomialGCD[c - z D[d, x] /. sol, d]

makemonic[vlist, x]

zlist  .  Log[makemonic[vlist, x]]

∫r \[DifferentialD]x

c = x;  d = 1 + x + (x^7)

res = Resultant[c - z D[d, x], d, x]

Factor[res]

Clear[RothsteinTrager]
RothsteinTrager[r_, x_] := 
      Module[{c, d, dmonic, z, res, sol, zlist, 
          vlist}, 
c = Numerator[r]; 
d = 
          Denominator[r]; 
dmonic = 
          makemonic[d, x]; 
c = 
          Together[c*dmonic/d]; 
d = 
          dmonic; 
res = 
          Resultant[c - z*D[d, x], d, x]; 
sol = 
          Union[Solve[res == 0, z]]; 
zlist = 
          z /. sol; 
vlist = 
          PolynomialGCD[c - z*D[d, x] /. sol, d, 
            Extension -> Automatic]; 
zlist  .  
          Log[makemonic[vlist, x]]
]

RothsteinTrager[(1/((x^3) + x)), x]

RothsteinTrager[r, x]

RothsteinTrager[(1/((x^2) - 2)), x]

∫(1/((x^2) - 2)) \[DifferentialD]x

RT = 
      RothsteinTrager[((-(x^2) - 9  x + 1)/(18 ((x^4) - (x^3) + x - 1))), x]

int = ∫((-(x^2) - 9  x + 
                1)/(18 ((x^4) - (x^3) + x - 
                    1))) \[DifferentialD]x

Plot[int, {x, 1, 3}]

Plot[RT - int, {x, 1, 3}]

FullSimplify[RT - int]

D[RT - int, x] // Together

const = RT - int /. x -> 0

const = ComplexExpand[const]

N[const]