## #557 ratsimp with algebraic == true

closed
nobody
5
2010-03-20
2004-04-14
Barton Willis
No

With algebraic == true, ratsimp doesn't fully simplify
some expressions. Here is an example

(C1) display2d : false\$
(C2) algebraic : true\$
(C3) integrate(1/(2+x^3),x)\$
(C4) ratsimp(diff(%,x));
(D4) 4*2^(2/3)/(4*2^(2/3)*x^3+8*2^(2/3))
(C5) ratsimp(%);
(D5) 1/(x^3+2)

Maybe this is the purpose of fullratsimp, but
it seems odd that ratsimp fails to cancel the
factor of 2^(2/3). I discovered this when I ran
run_testsuite with algebraic == true.

(C6) build_info();
Maxima version: 5.9.0.1cvs
Maxima build date: 7:58 4/5/2004
host type: i686-pc-mingw32
lisp-implementation-type: Kyoto Common Lisp
lisp-implementation-version: GCL 2.7.0

Barton

## Discussion

• Logged In: YES
user_id=588346

Though this is annoying and surprising, it *is* documented:

>>>>>>>>>(fullratsimp)
When non-rational expressions are involved, one call to
RATSIMP followed as is usual by non-rational ("general")
simplification may not be sufficient to return a simplified result.
<<<<<<<<<

Also, the algebraic flag only changes the behavior with
gcd=spmod. With gcd=subres (the default), you need two
ratsimp's regardless of the setting of algebraic.

• Robert Dodier
2006-07-29

Logged In: YES
user_id=501686

Observed in 5.9.3cvs.

• Robert Dodier
2006-07-29

• labels: --> Lisp Core - Simplification

• Dieter Kaiser
2010-03-20

This behavior is no longer present in Maxima 5.20post:

(%i1) algebraic:true;
(%o1) true

(%i2) integrate(1/(2+x^3),x);
(%o2) -log(2^(2/3)*x^2-2*x+2^(4/3))/(3*2^(5/3))
+atan((2^(5/3)*x-2)/(2*sqrt(3)))/(2^(2/3)*sqrt(3))
+log(x+2^(1/3))/(3*2^(2/3))

(%i3) ratsimp(diff(%,x));
(%o3) 1/(x^3+2)

This works for algebraic:false the same way.

We get immediately a fully simplified and correct result from ratsimp. The reason might be that the simplification of powers of integers has been implemented more consistent the last year.

Closing this bug report as "Works for me".
Dieter Kaiser

• Dieter Kaiser
2010-03-20

• status: open --> closed