First time here? Check out the FAQ!
answered 2015-08-01 17:42:31 +0100
The closest you can get is with Maxima's ratsimp:
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