First time here? Check out the FAQ!
answered 12 years ago
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)