1 | initial version |
I would probably try using the factor
method.
sage: var('x,y,z')
(x, y, z)
sage: expr=exp(4*x-2*y+4*z)+exp(4*x-3*y+5*z)
sage: expr.factor()
(e^y + e^z)*e^(4*x - 3*y + 4*z)
Perhaps the manual will contain useful info on that as well.