Ask Your Question

Revision history [back]

i guess that you are using simplify(expr), where expr is your symbolic expression. but notice that TAB completion like expr.simplify[TAB] reveals 11 simplify flavors. several of them will produce the expected output.

for example,

sage: expr = (1/2*(cos(x) + sin(x))*e^x - 1/2*(cos(x) - sin(x))*e^x)
sage: expr.simplify_full()
e^x*sin(x)

--

the top-level simplify has the same effect as expr.simplify(), as you can check in the code (use double question mark then hit enter, simplify??).