Menu ▾ ▴

#5871 rat() with algebraic : true inverts sums with a radical inside a radical wrongly

None
open
nobody
5
3 days ago
3 days ago
No

By Claude:

With algebraic : true, rat gives a wrong result for the inverse of a sum that contains a radical and a radical of it:

(%i1) display2d : false$
(%i2) algebraic : true$
(%i3) c : sqrt(sqrt(a)+1)+sqrt(a)$
(%i4) r : rat(1/c);
(%o4) -sqrt(a)+sqrt(sqrt(a)+1)
(%i5) ratsimp(r*c);
(%o5) -a+sqrt(a)+1
(%i6) float(subst(a = 4, [1/c, r]));
(%o6) [0.2679491924311227,-0.2679491924311228]
(%i7) divide(1, c, x);
(%o7) [sqrt(sqrt(a)+1)-sqrt(a),0]

r*c should be 1. The right result is (sqrt(a)-sqrt(sqrt(a)+1))/(a-sqrt(a)-1). divide has the same problem. ratsimp(1/c) is right. Maxima 5.49.0 behaves in the same way.

Discussion


Log in to post a comment.