Ask Your Question

Revision history [back]

There are different simplify functions. Try this:

sage: var('a b')
(a, b)
sage: f = ((a + b)^2 - a^2 - 2*a*b - b^2)
sage: f.simplify()  # as you had
(a + b)^2 - a^2 - 2*a*b - b^2
sage: f.simplify_full()
0