Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Assumptions on symbolic expressions

a, b = var('a,b')
((a + b)^2).expand()

How can I compute/expand the last expression assuming that $ab=0$? I.e. I would like the result to be $a^2+b^2$. I tried with assuming(..) but that doesn't have any effect.