| 1 | initial version |
To distinct two cases you can use the heaviside function:
f(x) = heaviside(x)*x^2
print type(f)
f(2); f(0); f(-2)
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.