| 1 | initial version |
The closest you can get is with Maxima's ratsimp:
sage: ex = trm.expand()
sage: m = ex._maxima_()
sage: m.ratsimp(sqrt(2)).sage()
sqrt(2)*(3*b + d) + 2*sqrt(2)*c + 3*a + c + 4*d
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.