By Claude:
With algebraic: true, ratsimp (and rat) do not cancel common factors that only exist because of an algebraic relation, although gcd finds them:
(%i1) display2d: false$
(%i2) algebraic: true$
(%i3) ratsimp((x^2-2)/(x-sqrt(2)));
(%o3) (x^2-2)/(x-sqrt(2))
(%i4) gcd(x^2-2, x-sqrt(2));
(%o4) x-sqrt(2)
(%i5) tellrat(a^2-2)$
(%i6) ratsimp((x^2-2)/(x-a));
(%o6) (x^2-2)/(x-a)
(%i7) ratsimp((x^2+(1-a)*x-a)/(x^2-2));
(%o7) (x^2+(1-a)*x-a)/(x^2-2)
The three ratsimp results should be x+sqrt(2), x+a and (x+1)/(x+a). Continuing the session with gcd: 'algebraic, a value that is accepted but not documented, gives them:
(%i8) gcd: 'algebraic$
(%i9) ratsimp((x^2-2)/(x-sqrt(2)));
(%o9) x+sqrt(2)
(%i10) ratsimp((x^2-2)/(x-a));
(%o10) x+a
(%i11) ratsimp((x^2+(1-a)*x-a)/(x^2-2));
(%o11) (x+1)/(x+a)